From 4313690ae89b32f5acb5c4eba5598287bb146f26 Mon Sep 17 00:00:00 2001 From: Karina Schaeffler Date: Fri, 4 Mar 2022 12:09:21 +0000 Subject: [PATCH] Feat/fix kaniko use mirror --- .gitignore | 2 +- .idea/runConfigurations.xml | 10 ---------- .idea/sonarlint/issuestore/index.pb | 0 container-publish.gitlab-ci.yml | 4 ++-- container-scan.gitlab-ci.yml | 4 ++-- 5 files changed, 5 insertions(+), 15 deletions(-) delete mode 100644 .idea/runConfigurations.xml delete mode 100644 .idea/sonarlint/issuestore/index.pb diff --git a/.gitignore b/.gitignore index e095c17..cd5375d 100644 --- a/.gitignore +++ b/.gitignore @@ -72,4 +72,4 @@ fabric.properties # Android studio 3.1+ serialized cache file .idea/caches/build_file_checksums.ser -/.idea/sonarlint/ +.idea/sonarlint/ diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml deleted file mode 100644 index 797acea..0000000 --- a/.idea/runConfigurations.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/sonarlint/issuestore/index.pb b/.idea/sonarlint/issuestore/index.pb deleted file mode 100644 index e69de29..0000000 diff --git a/container-publish.gitlab-ci.yml b/container-publish.gitlab-ci.yml index 7bd7374..19d2f9d 100644 --- a/container-publish.gitlab-ci.yml +++ b/container-publish.gitlab-ci.yml @@ -54,7 +54,7 @@ .publish-image-kaniko: image: - name: gcr.io/kaniko-project/executor:v1.7.0-debug + name: gcr.io/kaniko-project/executor:v1.6.0-debug entrypoint: [ "" ] <<: *container-publish-common variables: @@ -65,4 +65,4 @@ script: - mkdir -p /kaniko/.docker - echo "{\"auths\":{\"$DOCKER_REGISTRY\":{\"username\":\"$DOCKER_REGISTRY_USER\",\"password\":\"$DOCKER_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json - - /kaniko/executor --context $CONTEXT_LOCATION --dockerfile $DOCKERFILE_LOCATION --destination $CI_REGISTRY_IMAGE:$PARSED_VERSION $EXTRA_ARGS --skip-tls-verify + - /kaniko/executor --context $CONTEXT_LOCATION --dockerfile $DOCKERFILE_LOCATION --destination $CI_REGISTRY_IMAGE:$PARSED_VERSION $EXTRA_ARGS --registry-mirror nexus.corp.exxcellent.de:18000 --skip-tls-verify-registry nexus.corp.exxcellent.de:18000 --skip-tls-verify diff --git a/container-scan.gitlab-ci.yml b/container-scan.gitlab-ci.yml index f4738ee..4e227c0 100644 --- a/container-scan.gitlab-ci.yml +++ b/container-scan.gitlab-ci.yml @@ -45,7 +45,7 @@ .scan-container-kaniko: stage: test image: - name: gcr.io/kaniko-project/executor:debug + name: gcr.io/kaniko-project/executor:v1.6.0-debug entrypoint: [ "" ] variables: TRIVY_VERSION: 0.23.0 @@ -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 --skip-tls-verify + - /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 - ./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: