Update .gitlab/.gitlab-ci.yml file
This commit is contained in:
parent
a4293aefa0
commit
fa034ebbc5
@ -40,9 +40,11 @@ audit:
|
|||||||
- node_modules
|
- node_modules
|
||||||
policy: pull
|
policy: pull
|
||||||
script:
|
script:
|
||||||
- echo "vulnerabilities_high $(npm audit | grep -oE '[0-9]+ high' | grep -oE '[0-9]+' || echo 0)" > metrics.txt
|
- AUDIT=$(npm audit)
|
||||||
- echo "vulnerabilities_medium $(npm audit | grep -oE '[0-9]+ moderate' | grep -oE '[0-9]+' || echo 0)" >> metrics.txt
|
- echo "vulnerabilities_high $(echo $AUDIT | grep -oE '[0-9]+ high' | grep -oE '[0-9]+' || echo 0)" > metrics.txt
|
||||||
- echo "vulnerabilities_low $(npm audit | grep -oE '[0-9]+ low' | grep -oE '[0-9]+' || echo 0)" >> metrics.txt
|
- echo "vulnerabilities_medium $(echo $AUDIT | grep -oE '[0-9]+ moderate' | grep -oE '[0-9]+' || echo 0)" >> metrics.txt
|
||||||
|
- echo "vulnerabilities_low $(echo $AUDIT | grep -oE '[0-9]+ low' | grep -oE '[0-9]+' || echo 0)" >> metrics.txt
|
||||||
|
- echo "$AUDIT"
|
||||||
artifacts:
|
artifacts:
|
||||||
reports:
|
reports:
|
||||||
metrics: metrics.txt
|
metrics: metrics.txt
|
||||||
@ -80,6 +82,7 @@ tag:
|
|||||||
- git push -f origin $VERSION
|
- git push -f origin $VERSION
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
production:
|
production:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
Loading…
Reference in New Issue
Block a user