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

This commit is contained in:
Blair Vanderlugt 2021-07-05 21:00:41 +00:00
parent 6601a3cdb6
commit 4c420bdcfd
2 changed files with 14 additions and 12 deletions

View File

@ -3,23 +3,28 @@
APP_NAME: cic-eth APP_NAME: cic-eth
DOCKERFILE_PATH: $APP_NAME/docker/Dockerfile DOCKERFILE_PATH: $APP_NAME/docker/Dockerfile
.cic_eth_changes_target: # .cic_eth_changes_target:
rules: # rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event" # - if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes: # changes:
- $CONTEXT/$APP_NAME/**/* # - $CONTEXT/$APP_NAME/**/*
when: always # when: always
build-mr-cic-eth: build-mr-cic-eth:
extends: extends:
- .cic_eth_variables - .cic_eth_variables
- .cic_eth_changes_target # - .cic_eth_changes_target
- .py_build_target_test - .py_build_target_test
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes:
- apps/cic-eth/**/*
when: always
test-mr-cic-eth: test-mr-cic-eth:
extends: extends:
- .cic_eth_variables - .cic_eth_variables
- .cic_eth_changes_target
stage: test stage: test
image: $IMAGE_TAG_BASE image: $IMAGE_TAG_BASE
script: script:
@ -30,4 +35,3 @@ test-mr-cic-eth:
build-push-cic-eth: build-push-cic-eth:
extends: extends:
- .py_build_push - .py_build_push
- .cic_eth_variables

View File

@ -26,9 +26,7 @@ variables:
- mkdir -p /kaniko/.docker - mkdir -p /kaniko/.docker
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > "/kaniko/.docker/config.json" - 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 --destination $IMAGE_TAG_BASE - /kaniko/executor --context $CONTEXT --dockerfile $DOCKERFILE_PATH $KANIKO_CACHE_ARGS --cache-repo $CI_REGISTRY_IMAGE --target test --destination $IMAGE_TAG_BASE
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
when: always
.py_build_push: .py_build_push:
stage: build stage: build