Last active
September 20, 2022 14:37
-
-
Save JonasGroeger/7f8e2d9453ae13d79d53f857730f1ec3 to your computer and use it in GitHub Desktop.
GitLab CI/CD: Staged Deployment (dev -> stage -> prod)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# When deploy-dev auto-deploys | |
# When deploy-dev succeeds, the (⏵) button for the deploy-stage stage shows up | |
# When deploy-dev fails, the (⏵) button for the deploy-stage stage does NOT show up | |
# Same for the deploy-prod stage | |
stages: | |
- deploy-dev | |
- deploy-test | |
- deploy-stage | |
deploy-dev: | |
stage: deploy-dev | |
environment: Development | |
script: | |
- env | |
deploy-stage: | |
stage: deploy-stage | |
environment: Staging | |
script: | |
- env | |
when: manual | |
needs: | |
- deploy-dev | |
deploy-prod: | |
stage: deploy-prod | |
environment: Production | |
script: | |
- env | |
when: manual | |
needs: | |
- deploy-stage |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment