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