From 2e6e80e1346a047aa30667b2a2cdcb32b14c38d7 Mon Sep 17 00:00:00 2001 From: Blair Vanderlugt Date: Tue, 6 Jul 2021 18:12:32 +0000 Subject: [PATCH] Update ci_templates/.cic-template.yml, apps/cic-eth/.gitlab-ci.yml files --- apps/cic-eth/.gitlab-ci.yml | 2 +- ci_templates/.cic-template.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/cic-eth/.gitlab-ci.yml b/apps/cic-eth/.gitlab-ci.yml index e2dfc69a..588a0788 100644 --- a/apps/cic-eth/.gitlab-ci.yml +++ b/apps/cic-eth/.gitlab-ci.yml @@ -22,7 +22,7 @@ test-mr-cic-eth: extends: - .cic_eth_variables - .cic_eth_changes_target - image: $IMAGE_TAG + image: $MR_IMAGE_TAG script: - cd apps/$APP_NAME/ - pip install -r test_requirements.txt diff --git a/ci_templates/.cic-template.yml b/ci_templates/.cic-template.yml index ad4cd82e..9ee581d5 100644 --- a/ci_templates/.cic-template.yml +++ b/ci_templates/.cic-template.yml @@ -3,7 +3,8 @@ image: entrypoint: [""] variables: - KANIKO_CACHE_ARGS: "--cache=false --cache-copy-layers=true --cache-ttl=24h" + KANIKO_CACHE_ARGS: "--cache=true --cache-copy-layers=true --cache-ttl=24h" + MR_IMAGE_TAG: $CI_REGISTRY_IMAGE/mergerequest/$APP_NAME:$CI_COMMIT_SHORT_SHA .py_build_merge_request: stage: build @@ -23,11 +24,10 @@ variables: stage: build variables: CI_DEBUG_TRACE: "true" - IMAGE_TAG: $CI_REGISTRY_IMAGE/mergerequest/$APP_NAME:$CI_COMMIT_SHORT_SHA script: - mkdir -p /kaniko/.docker - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > "/kaniko/.docker/config.json" - - /kaniko/executor --context $CONTEXT --dockerfile $DOCKERFILE_PATH $KANIKO_CACHE_ARGS --cache-repo $CI_REGISTRY_IMAGE --target dev --tarPath $APP_NAME-test-image.tar --destination $IMAGE_TAG + - /kaniko/executor --context $CONTEXT --dockerfile $DOCKERFILE_PATH $KANIKO_CACHE_ARGS --cache-repo $CI_REGISTRY_IMAGE --target dev --tarPath $APP_NAME-test-image.tar --destination $MR_IMAGE_TAG rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" when: always