Commit 6dffbec1 authored by Mayra Cabrera's avatar Mayra Cabrera

Refactor production job to remove duplication

parent a7e18757
Pipeline #21360508 passed with stage
in 1 minute and 31 seconds
......@@ -265,7 +265,7 @@ staging:
# 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
......@@ -282,6 +282,9 @@ production:
url: http://$CI_PROJECT_PATH_SLUG.$AUTO_DEVOPS_DOMAIN
artifacts:
paths: [environment_url.txt]
production:
<<: *production_template
only:
refs:
- master
......@@ -290,23 +293,8 @@ production:
variables:
- $STAGING_ENABLED
production_manual:
stage: production
script:
- check_kube_domain
- install_dependencies
- download_chart
- ensure_namespace
- install_tiller
- create_secret
- deploy
- delete canary
- persist_environment_url
environment:
name: production
url: http://$CI_PROJECT_PATH_SLUG.$AUTO_DEVOPS_DOMAIN
artifacts:
paths: [environment_url.txt]
production_manual:
<<: *production_template
when: manual
only:
refs:
......
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