MON-449 global ci to build template stack and terraform apply

This commit is contained in:
Quentin Manfroi 2019-05-03 19:19:09 +02:00
parent ca62eaf7c2
commit 2e6ff3a5cf

View File

@ -2,8 +2,10 @@ image: hashicorp/terraform:full
stages: stages:
- test - test
- build
- deploy
test_auto_update: auto_update:
stage: test stage: test
script: script:
- apk update - apk update
@ -18,3 +20,33 @@ test_auto_update:
- product-teams - product-teams
- kubernetes - kubernetes
- gke - gke
deploy_terraform:
stage: deploy
script:
- apk update
- apk upgrade
- apk add --no-cache curl
- "curl -X POST -F token=${TEMPLATES_GITLAB_TOKEN} -F ref=MON-182_minimal_v1 -F 'variables[SCENARIO]=test' https://git.fr.clara.net/api/v4/projects/513/trigger/pipeline"
only:
- master
tags:
- product-teams
- kubernetes
- gke
build_template:
stage: build
script:
- apk update
- apk upgrade
- apk add --no-cache curl
- "curl -X POST -F token=${TEMPLATES_GITLAB_TOKEN} -F ref=MON-182_minimal_v1 -F 'variables[SCENARIO]=build' https://git.fr.clara.net/api/v4/projects/513/trigger/pipeline"
only:
- tags
except:
- branches
tags:
- product-teams
- kubernetes
- gke