Last active
April 22, 2020 06:38
-
-
Save tasdemirbahadir/3959241289a0bd45b9610f810553c939 to your computer and use it in GitHub Desktop.
Demonstration of config application to K8s.
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
variables: | |
VERSION: $CI_COMMIT_SHORT_SHA | |
image: kubectl-image | |
stages: | |
- Apply QA | |
- Redeploy QA | |
- Apply Stage | |
- Redeploy Stage | |
- Apply Prod | |
- Redeploy Prod | |
Toggles QA: | |
stage: Apply QA | |
only: | |
changes: | |
- configs/qa/* | |
environment: | |
name: qa | |
tags: | |
- qa | |
script: | |
- envsubst < configs/qa/configs.yml | kubectl apply --record=true -f - | |
Print QA: | |
stage: Apply QA | |
only: | |
changes: | |
- configs/qa/* | |
environment: | |
name: qa | |
tags: | |
- qa | |
script: | |
- sh print.sh qa | |
Redeploy QA: | |
stage: Redeploy QA | |
only: | |
changes: | |
- configs/qa/* | |
environment: | |
name: qa | |
tags: | |
- qa | |
script: | |
- sh redeploy-script.sh ${CI_PROJECT_NAME}-deployment | |
Toggles Stage: | |
stage: Apply Stage | |
only: | |
changes: | |
- configs/stage/* | |
environment: | |
name: stage | |
tags: | |
- stage | |
script: | |
- envsubst < configs/stage/configs.yml | kubectl apply --record=true -f - | |
Print Stage: | |
stage: Apply Stage | |
only: | |
changes: | |
- configs/stage/* | |
environment: | |
name: stage | |
tags: | |
- stage | |
script: | |
- sh print.sh stage | |
Redeploy Stage: | |
stage: Redeploy Stage | |
only: | |
changes: | |
- configs/stage/* | |
environment: | |
name: stage | |
tags: | |
- stage | |
script: | |
- sh redeploy-script.sh ${CI_PROJECT_NAME}-deployment | |
Toggles Prod: | |
stage: Apply Prod | |
only: | |
changes: | |
- configs/prod/* | |
environment: | |
name: prod | |
tags: | |
- prod | |
script: | |
- envsubst < configs/prod/configs.yml | kubectl apply --record=true -f - | |
Print Prod: | |
stage: Apply Prod | |
only: | |
changes: | |
- configs/prod/* | |
environment: | |
name: prod | |
tags: | |
- prod | |
script: | |
- sh print.sh prod | |
Redeploy Prod: | |
stage: Redeploy Prod | |
only: | |
changes: | |
- configs/prod/* | |
environment: | |
name: prod | |
tags: | |
- prod | |
script: | |
- sh redeploy-script.sh ${CI_PROJECT_NAME}-deployment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment