From 632744f14d076372717c5658b610a69c8ff2f8d3 Mon Sep 17 00:00:00 2001 From: Karina Date: Tue, 19 Apr 2022 08:38:42 +0200 Subject: [PATCH] feat(container-scan): add extra args to kaniko container scan template --- container-scan.gitlab-ci.yml | 2 +- documentation/chapters/templates/container-scan.adoc | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/container-scan.gitlab-ci.yml b/container-scan.gitlab-ci.yml index 208c9b4..6818e82 100644 --- a/container-scan.gitlab-ci.yml +++ b/container-scan.gitlab-ci.yml @@ -58,7 +58,7 @@ - wget "https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}/trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz" - tar zxvf trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz script: - - /kaniko/executor --context $CONTEXT_LOCATION --dockerfile $DOCKERFILE_LOCATION --cache-dir cache/image --tarPath image.tar --no-push --destination image --registry-mirror nexus.corp.exxcellent.de:18000 --skip-tls-verify-registry nexus.corp.exxcellent.de:18000 --skip-tls-verify + - /kaniko/executor --context $CONTEXT_LOCATION --dockerfile $DOCKERFILE_LOCATION $KANIKO_EXTRA_ARGS --cache-dir cache/image --tarPath image.tar --no-push --destination image --registry-mirror nexus.corp.exxcellent.de:18000 --skip-tls-verify-registry nexus.corp.exxcellent.de:18000 --skip-tls-verify - ./trivy --cache-dir .trivycache/ image --timeout 15m $TRIVY_EXTRA_ARGS --exit-code 0 --severity HIGH,CRITICAL --format template --template "@contrib/junit.tpl" -o junit-report.xml --input image.tar - ./trivy --cache-dir .trivycache/ image --timeout 15m $TRIVY_EXTRA_ARGS --exit-code $EXITCODE --severity HIGH,CRITICAL --input image.tar cache: diff --git a/documentation/chapters/templates/container-scan.adoc b/documentation/chapters/templates/container-scan.adoc index 494792c..ff1bead 100644 --- a/documentation/chapters/templates/container-scan.adoc +++ b/documentation/chapters/templates/container-scan.adoc @@ -23,6 +23,8 @@ Wenn 0 benutzt wird, läuft die CI weiter. Benutzte `allow_failure: true` damit die CI weiter läuft aber ein Failure angezeigt wird. | - |GRADLE_CLI_OPTS | Zusätzliche CLI Opts für Gradle | "" + +|KANIKO_EXTRA_ARGS | Extra Arguments for the build of the image with Kaniko | "" |=== .container scan template