From e06638d3b940e8ab676f158f1aabe3195ae2ee9e Mon Sep 17 00:00:00 2001 From: "Igor Zimovets (EPAM)" Date: Tue, 1 Mar 2022 11:02:45 +0000 Subject: [PATCH 1/2] update rules --- devops/gcp/bootstrap.yaml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/devops/gcp/bootstrap.yaml b/devops/gcp/bootstrap.yaml index bace5ad5..9e2e93fc 100644 --- a/devops/gcp/bootstrap.yaml +++ b/devops/gcp/bootstrap.yaml @@ -15,11 +15,11 @@ osdu-gcp-bootstrap: - python $OSDU_GCP_DEPLOYMENTS_SCRIPTS_SUBDIR/DeploySharedSchemas.py -u $OSDU_GCP_SCHEMA_URL/schema rules: - if: '$OSDU_GCP == "true" && $CI_COMMIT_BRANCH =~ /^release/' - when: never + when: on_success - if: '$OSDU_GCP == "true" && $CI_COMMIT_TAG' - when: never + when: on_success - if: '$OSDU_GCP == "true"' - when: always + when: on_success osdu-gcp-bootstrap-dev2: stage: bootstrap @@ -37,23 +37,23 @@ osdu-gcp-bootstrap-dev2: - python $OSDU_GCP_DEPLOYMENTS_SCRIPTS_SUBDIR/DeploySharedSchemas.py -u $OSDU_GCP_SCHEMA_URL/schema rules: - if: '$OSDU_GCP == "true" && $CI_COMMIT_BRANCH =~ /^release/' - when: always + when: on_success - if: '$OSDU_GCP == "true" && $CI_COMMIT_TAG' - when: always + when: on_success # The variable DEV2="true" should be specified manually in GitLab before running a pipeline to test this job against a protected branch - if: '$OSDU_GCP == "true" && $DEV2 == "true"' - when: always + when: on_success osdu-gcp-test: needs: ["osdu-gcp-bootstrap"] # Rules should be deleted here after common pipeline is updated with this rules rules: - if: '$OSDU_GCP == "true" && $OSDU_GCP_INT_TEST_TYPE != "python" && $CI_COMMIT_BRANCH =~ /^release/' - when: never + when: on_success - if: '$OSDU_GCP == "true" && $OSDU_GCP_INT_TEST_TYPE != "python" && $CI_COMMIT_TAG' - when: never + when: on_success - if: '$OSDU_GCP == "true" && $OSDU_GCP_INT_TEST_TYPE != "python"' - when: always + when: on_success osdu-gcp-dev2-test: needs: ["osdu-gcp-bootstrap-dev2"] @@ -71,5 +71,8 @@ osdu-gcp-containerize-bootstrap-gitlab: - docker push $CI_REGISTRY_IMAGE/osdu-gcp-bootstrap rules: - if: '$OSDU_GCP == "true" && $CI_COMMIT_BRANCH =~ /^master$/' + when: on_success - if: '$OSDU_GCP == "true" && $CI_COMMIT_BRANCH =~ /.*bootstrap.*/' + when: on_success - if: '$OSDU_GCP == "true" && $CI_COMMIT_TAG' + when: on_success -- GitLab From 8a6ee7f6f30cbed27e210e4d934e769f1840d0a0 Mon Sep 17 00:00:00 2001 From: "Igor Zimovets (EPAM)" Date: Wed, 2 Mar 2022 10:24:46 +0000 Subject: [PATCH 2/2] update rules --- devops/gcp/bootstrap.yaml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/devops/gcp/bootstrap.yaml b/devops/gcp/bootstrap.yaml index 9e2e93fc..6e94b87a 100644 --- a/devops/gcp/bootstrap.yaml +++ b/devops/gcp/bootstrap.yaml @@ -15,9 +15,9 @@ osdu-gcp-bootstrap: - python $OSDU_GCP_DEPLOYMENTS_SCRIPTS_SUBDIR/DeploySharedSchemas.py -u $OSDU_GCP_SCHEMA_URL/schema rules: - if: '$OSDU_GCP == "true" && $CI_COMMIT_BRANCH =~ /^release/' - when: on_success + when: never - if: '$OSDU_GCP == "true" && $CI_COMMIT_TAG' - when: on_success + when: never - if: '$OSDU_GCP == "true"' when: on_success @@ -40,18 +40,15 @@ osdu-gcp-bootstrap-dev2: when: on_success - if: '$OSDU_GCP == "true" && $CI_COMMIT_TAG' when: on_success - # The variable DEV2="true" should be specified manually in GitLab before running a pipeline to test this job against a protected branch - - if: '$OSDU_GCP == "true" && $DEV2 == "true"' - when: on_success osdu-gcp-test: needs: ["osdu-gcp-bootstrap"] # Rules should be deleted here after common pipeline is updated with this rules rules: - if: '$OSDU_GCP == "true" && $OSDU_GCP_INT_TEST_TYPE != "python" && $CI_COMMIT_BRANCH =~ /^release/' - when: on_success + when: never - if: '$OSDU_GCP == "true" && $OSDU_GCP_INT_TEST_TYPE != "python" && $CI_COMMIT_TAG' - when: on_success + when: never - if: '$OSDU_GCP == "true" && $OSDU_GCP_INT_TEST_TYPE != "python"' when: on_success -- GitLab