Update ci_templates/.cic-template.yml, apps/cic-eth/.gitlab-ci.yml files

This commit is contained in:
Blair Vanderlugt 2021-07-06 18:12:32 +00:00
parent bc868fd2c8
commit 2e6e80e134
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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