47 lines
1.0 KiB
YAML
47 lines
1.0 KiB
YAML
image: alpine:latest
|
|
|
|
stages:
|
|
- test
|
|
- build
|
|
- deploy
|
|
|
|
auto_update:
|
|
image: claranet/datadog-terraform:latest
|
|
stage: test
|
|
script:
|
|
- ./scripts/auto_update.sh ./
|
|
- git status
|
|
- git diff --exit-code
|
|
tags:
|
|
- product-teams
|
|
- kubernetes
|
|
- gke
|
|
|
|
deploy_terraform:
|
|
stage: deploy
|
|
script:
|
|
- apk update
|
|
- apk add --no-cache curl
|
|
- "curl -X POST -F token=${TEMPLATES_GITLAB_TOKEN} -F ref=${TEMPLATES_GITLAB_BRANCH:-master} -F \"variables[SCENARIO]=test\" ${CI_API_V4_URL}/projects/${TEMPLATES_GITLAB_ID}/trigger/pipeline"
|
|
only:
|
|
- master
|
|
tags:
|
|
- product-teams
|
|
- kubernetes
|
|
- gke
|
|
|
|
build_template:
|
|
stage: build
|
|
script:
|
|
- apk update
|
|
- apk add --no-cache curl
|
|
- "curl -X POST -F token=${TEMPLATES_GITLAB_TOKEN} -F ref=${TEMPLATES_GITLAB_BRANCH:-master} -F \"variables[SCENARIO]=build\" -F \"variables[TAG]=$CI_COMMIT_TAG\" ${CI_API_V4_URL}/projects/${TEMPLATES_GITLAB_ID}/trigger/pipeline"
|
|
only:
|
|
- tags
|
|
except:
|
|
- branches
|
|
tags:
|
|
- product-teams
|
|
- kubernetes
|
|
- gke
|