From 4ecf4f12147424839b0a5bbfdbe509e5a04d2818 Mon Sep 17 00:00:00 2001 From: Blair Vanderlugt Date: Tue, 6 Jul 2021 19:36:17 +0000 Subject: [PATCH] Update ci_templates/.cic-template.yml, apps/cic-eth/.gitlab-ci.yml, .gitlab-ci.yml, apps/contract-migration/.gitlab-ci.yml files --- .gitlab-ci.yml | 2 +- apps/cic-eth/.gitlab-ci.yml | 5 +++-- apps/contract-migration/.gitlab-ci.yml | 12 ++++++++++-- ci_templates/.cic-template.yml | 6 ------ 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d948128f..44271fdb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,6 @@ include: - local: 'ci_templates/.cic-template.yml' - # - local: 'apps/contract-migration/.gitlab-ci.yml' + - local: 'apps/contract-migration/.gitlab-ci.yml' - local: 'apps/cic-eth/.gitlab-ci.yml' # - local: 'apps/cic-ussd/.gitlab-ci.yml' # - local: 'apps/cic-notify/.gitlab-ci.yml' diff --git a/apps/cic-eth/.gitlab-ci.yml b/apps/cic-eth/.gitlab-ci.yml index 4c8f5b16..7600d75b 100644 --- a/apps/cic-eth/.gitlab-ci.yml +++ b/apps/cic-eth/.gitlab-ci.yml @@ -7,9 +7,10 @@ .cic_eth_changes_target: rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" - #changes: - #- $CONTEXT/$APP_NAME/**/* + changes: + - $CONTEXT/**/* when: always + - when: never build-mr-cic-eth: extends: diff --git a/apps/contract-migration/.gitlab-ci.yml b/apps/contract-migration/.gitlab-ci.yml index 39efdbfb..bbd399f1 100644 --- a/apps/contract-migration/.gitlab-ci.yml +++ b/apps/contract-migration/.gitlab-ci.yml @@ -3,10 +3,18 @@ APP_NAME: contract-migration DOCKERFILE_PATH: $APP_NAME/docker/Dockerfile_ci +# .contract_migration_changes_target: +# rules: +# - changes: +# - $CONTEXT/$APP_NAME/* + .contract_migration_changes_target: rules: - - changes: - - $CONTEXT/$APP_NAME/* + - if: $CI_PIPELINE_SOURCE == "merge_request_event" + changes: + - $CONTEXT/**/* + when: always + - when: never build-mr-contract-migration: extends: diff --git a/ci_templates/.cic-template.yml b/ci_templates/.cic-template.yml index 9ee581d5..81799d34 100644 --- a/ci_templates/.cic-template.yml +++ b/ci_templates/.cic-template.yml @@ -16,9 +16,6 @@ variables: - 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 --destination $IMAGE_TAG - rules: - - if: $CI_PIPELINE_SOURCE == "merge_request_event" - when: always .py_build_target_dev: stage: build @@ -28,9 +25,6 @@ variables: - 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 $MR_IMAGE_TAG - rules: - - if: $CI_PIPELINE_SOURCE == "merge_request_event" - when: always .py_build_push: stage: build