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

This commit is contained in:
Blair Vanderlugt 2021-07-05 20:15:07 +00:00
parent 52239e2e82
commit 3e526ba1ac
2 changed files with 2 additions and 4 deletions

View File

@ -21,7 +21,7 @@ test-mr-cic-eth:
- .cic_eth_variables
- .cic_eth_changes_target
stage: test
image: $IMAGE_TAG
image: $IMAGE_TAG_BASE
script:
- cd apps/$APP_NAME/
- pytest -x --cov=cic_eth --cov-fail-under=90 --cov-report term-missing tests

View File

@ -22,12 +22,10 @@ variables:
stage: build
variables:
IMAGE_TAG_BASE: $CI_REGISTRY_IMAGE/$APP_NAME:$CI_COMMIT_BRANCH-$CI_COMMIT_SHORT_SHA
IMAGE_TAG: "$IMAGE_TAG_BASE-$(date +%s)"
script:
# - export IMAGE_TAG="$IMAGE_TAG_BASE-$(date +%s)"
- 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 test --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 test --tarPath $APP_NAME-test-image.tar --destination $IMAGE_TAG_BASE
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: always