diff --git a/ci/spec/zapier/audit.yaml b/ci/spec/zapier/audit.yaml index 67e43e2f94..398998cd9e 100644 --- a/ci/spec/zapier/audit.yaml +++ b/ci/spec/zapier/audit.yaml @@ -1,19 +1,35 @@ ##ZAPIER audit_zapier: - stage: BuildAndTest - allow_failure: true - script: - - sudo apt-get update - - sudo apt-get install -y curl gcc - - sudo apt-get install -y build-essential - - curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - - - sudo apt-get install -y nodejs - - cd zapier - - npm ci - - npm run audit - - npm run dep-check - - cd .. - except: - refs: - - hotfix-master - - hotfix-release \ No newline at end of file + stage: BuildAndTest + allow_failure: true + script: + - | + if [[ $CI_COMMIT_BRANCH != "master" ]] && [[ $CI_COMMIT_BRANCH != "release" ]] + then + chmod +x ./ci/scripts/checkhash.sh + export zapier_exist=`./ci/scripts/checkhash.sh audit_zapier zapier` + if [[ $zapier_exist == *"true"* ]] + then + exit ${CI_JOB_SKIP_EXIT_CODE:-0} + fi + fi + - sudo apt-get update + - sudo apt-get install -y curl gcc + - sudo apt-get install -y build-essential + - curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - + - sudo apt-get install -y nodejs + - cd zapier + - npm ci + - npm run audit + - npm run dep-check + - cd .. + - | + if [[ $CI_COMMIT_BRANCH != "master" ]] && [[ $CI_COMMIT_BRANCH != "release" ]] + then + chmod +x ./ci/scripts/storehash.sh + ./ci/scripts/storehash.sh audit_zapier zapier + fi + except: + refs: + - hotfix-master + - hotfix-release