diff --git a/Auto-DevOps.gitlab-ci.yml b/Auto-DevOps.gitlab-ci.yml index b8a9d8d083fb31951b0cca9381713b526bc7d1de..822a23a57ad3a62b9ee7450c053b2354537c38c9 100644 --- a/Auto-DevOps.gitlab-ci.yml +++ b/Auto-DevOps.gitlab-ci.yml @@ -217,7 +217,7 @@ stop_review: # only manually promote to production, enable this job by removing the dot (.), # and uncomment the `when: manual` line in the `production` job. -.staging: +staging: stage: staging script: - check_kube_domain @@ -234,6 +234,8 @@ stop_review: refs: - master kubernetes: active + variables: + - $STAGING_ENABLED # Canaries are disabled by default, but if you want them, # and know what the downsides are, enable this job by removing the dot (.), @@ -263,7 +265,7 @@ stop_review: # or `canary` deploys, or you simply want more control over when you deploy # to production, uncomment the `when: manual` line in the `production` job. -production: +.production: &production_template stage: production script: - check_kube_domain @@ -280,11 +282,26 @@ production: url: http://$CI_PROJECT_PATH_SLUG.$AUTO_DEVOPS_DOMAIN artifacts: paths: [environment_url.txt] -# when: manual + +production: + <<: *production_template + only: + refs: + - master + kubernetes: active + except: + variables: + - $STAGING_ENABLED + +production_manual: + <<: *production_template + when: manual only: refs: - master kubernetes: active + variables: + - $STAGING_ENABLED # ---------------------------------------------------------------------------