add audit job.

This commit is contained in:
Nawaz Dhandala 2021-07-12 15:23:36 +01:00
parent 3f09278222
commit 60bd6522df
2 changed files with 31 additions and 1 deletions

View File

@ -140,4 +140,8 @@ include:
- '/ci/spec/application-scanner/deploy.yaml'
# Script Runner
- '/ci/spec/script-runner/deploy.yaml'
- '/ci/spec/script-runner/audit.yaml'
- '/ci/spec/script-runner/deploy.yaml'
# Container Scanner
- '/ci/spec/container-scanner/deploy.yaml'

View File

@ -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