Commit 54f36f79 authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch...

Merge branch '38549-variables-to-define-deploy-policy-for-staging-and-production-environments' into 'master'

Use variables to define deploy policy for staging and production environments

Closes gitlab-ce#38549

See merge request !160
parents a3ac3086 b4cdfa2f
Pipeline #21364016 passed with stage
in 22 seconds
......@@ -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
# ---------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment