diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e8f0b0e26a811d91d0031d77bb3584978587211e..85c984f0b2f059a593554e483bc309d515eb833c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -156,14 +156,16 @@ staging_deploy: url: https://staging.geo.apis.holi.social variables: ENVIRONMENT_ID: staging - only: - - main + rules: + - if: $CI_COMMIT_BRANCH == "main" + when: on_success staging_smoketest: extends: .smoketest needs: ['staging_deploy'] - only: - - main + rules: + - if: $CI_COMMIT_BRANCH == "main" + when: on_success resource_group: unified-api-staging staging_trigger_unified-api_redeployment: @@ -174,8 +176,9 @@ staging_trigger_unified-api_redeployment: forward: yaml_variables: false pipeline_variables: false - only: - - main + rules: + - if: $CI_COMMIT_BRANCH == "main" + when: on_success ## production environment @@ -189,14 +192,16 @@ production_deploy: url: https://production.geo.apis.holi.social variables: ENVIRONMENT_ID: production - only: - - production + rules: + - if: $CI_COMMIT_BRANCH == "production" + when: on_success production_smoketest: extends: .smoketest needs: ['production_deploy'] - only: - - production + rules: + - if: $CI_COMMIT_BRANCH == "production" + when: on_success production_trigger_unified-api_redeployment: needs: ['production_smoketest'] @@ -206,6 +211,7 @@ production_trigger_unified-api_redeployment: forward: yaml_variables: false pipeline_variables: false - only: - - production + rules: + - if: $CI_COMMIT_BRANCH == "production" + when: on_success resource_group: unified-api-production