Feat/cve scan add cachedir and junit report
This commit is contained in:
parent
771785ef5c
commit
d2ac295a76
@ -10,8 +10,15 @@
|
|||||||
- tar zxvf trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz
|
- tar zxvf trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz
|
||||||
script:
|
script:
|
||||||
- mvn $MAVEN_CLI_OPTS compile jib:buildTar -DskipTests
|
- mvn $MAVEN_CLI_OPTS compile jib:buildTar -DskipTests
|
||||||
- ./trivy --exit-code $EXITCODE_ON_HIGH --severity HIGH --no-progress --auto-refresh --input target/jib-image.tar
|
- ./trivy --cache-dir .trivycache/ --exit-code 0 --cache-dir .trivycache/ --no-progress --format template --template "@contrib/junit.tpl" -o junit-report.xml --input target/jib-image.tar
|
||||||
- ./trivy --exit-code $EXITCODE_ON_CRITICAL --severity CRITICAL --no-progress --auto-refresh --input target/jib-image.tar
|
- ./trivy --cache-dir .trivycache/ --exit-code $EXITCODE_ON_HIGH --severity HIGH --no-progress --auto-refresh --input target/jib-image.tar
|
||||||
|
- ./trivy --cache-dir .trivycache/ --exit-code $EXITCODE_ON_CRITICAL --severity CRITICAL --no-progress --auto-refresh --input target/jib-image.tar
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- .trivycache/
|
||||||
|
artifacts:
|
||||||
|
reports:
|
||||||
|
junit: junit-report.xml
|
||||||
|
|
||||||
.scan-container-kaniko:
|
.scan-container-kaniko:
|
||||||
stage: test
|
stage: test
|
||||||
@ -30,5 +37,12 @@
|
|||||||
- tar zxvf trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz
|
- tar zxvf trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz
|
||||||
script:
|
script:
|
||||||
- /kaniko/executor --context $CONTEXT_LOCATION --dockerfile $DOCKERFILE_LOCATION --cache-dir cache/image --tarPath image.tar --no-push --destination image
|
- /kaniko/executor --context $CONTEXT_LOCATION --dockerfile $DOCKERFILE_LOCATION --cache-dir cache/image --tarPath image.tar --no-push --destination image
|
||||||
- ./trivy --exit-code $EXITCODE_ON_HIGH --severity HIGH --no-progress --auto-refresh --input image.tar
|
- ./trivy --cache-dir .trivycache/ --exit-code 0 --cache-dir .trivycache/ --no-progress --format template --template "@contrib/junit.tpl" -o junit-report.xml --input image.tar
|
||||||
- ./trivy --exit-code $EXITCODE_ON_CRITICAL --severity CRITICAL --no-progress --auto-refresh --input image.tar
|
- ./trivy --cache-dir .trivycache/ --exit-code $EXITCODE_ON_HIGH --severity HIGH --no-progress --auto-refresh --input image.tar
|
||||||
|
- ./trivy --cache-dir .trivycache/ --exit-code $EXITCODE_ON_CRITICAL --severity CRITICAL --no-progress --auto-refresh --input image.tar
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- .trivycache/
|
||||||
|
artifacts:
|
||||||
|
reports:
|
||||||
|
junit: junit-report.xml
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user