forked from claranet/terraform-datadog-monitors
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
44 lines (38 loc) · 1 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
image: alpine:latest
variables:
GIT_SUBMODULE_STRATEGY: recursive
stages:
- test
- build
- deploy
auto_update:
image: claranet/terraform-ci:0.13.1
stage: test
script:
- ./scripts/auto_update.sh
- git status
- git diff --exit-code
tags:
- ops4ops-claranet
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:
- ops4ops-claranet
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:
- ops4ops-claranet