From 60bd6522df9eb4e0473cece325e3819ab93e0a2a Mon Sep 17 00:00:00 2001 From: Nawaz Dhandala Date: Mon, 12 Jul 2021 15:23:36 +0100 Subject: [PATCH] add audit job. --- .gitlab-ci.yml | 6 +++++- ci/spec/script-runner/audit.yaml | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 ci/spec/script-runner/audit.yaml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b5220bdb6b..7c5c7b0788 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -140,4 +140,8 @@ include: - '/ci/spec/application-scanner/deploy.yaml' # Script Runner - - '/ci/spec/script-runner/deploy.yaml' \ No newline at end of file + - '/ci/spec/script-runner/audit.yaml' + - '/ci/spec/script-runner/deploy.yaml' + + # Container Scanner + - '/ci/spec/container-scanner/deploy.yaml' \ No newline at end of file diff --git a/ci/spec/script-runner/audit.yaml b/ci/spec/script-runner/audit.yaml new file mode 100644 index 0000000000..4e4df37728 --- /dev/null +++ b/ci/spec/script-runner/audit.yaml @@ -0,0 +1,26 @@ +# BACKEND +audit_script-runner: + stage: BuildAndTest + allow_failure: true + script: + - chmod +x ./ci/scripts/checkhash.sh + - export next_stage=`./ci/scripts/checkhash.sh audit_script-runner script-runner` + - if [[ $next_stage == *"skip"* ]]; then exit ${CI_JOB_SKIP_EXIT_CODE:-0}; 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_15.x | sudo -E bash - + - sudo apt-get install -y nodejs + - cd script-runner + - npm ci + - npm run audit + - npm run dep-check + - cd .. + - chmod +x ./ci/scripts/storehash.sh + - ./ci/scripts/storehash.sh audit_script-runner script-runner + - chmod +x ./ci/scripts/cleanup.sh + - ./ci/scripts/cleanup.sh + only: + refs: + - master + - release