-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
42 lines (39 loc) · 933 Bytes
/
.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
stages:
- validate
- lint
- test
validate:
stage: validate
image:
name: "hashicorp/terraform:0.12.8"
entrypoint:
- "/usr/bin/env"
- "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
script:
- terraform init
- terraform validate
artifacts:
paths:
- .terraform
terralint:
stage: lint
image:
name: "wata727/tflint"
entrypoint:
- "/usr/bin/env"
- "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
script:
- tflint
terratest:
stage: test
image:
name: "hashicorp/terraform:full"
entrypoint:
- "/usr/bin/env"
- "PATH=/go/bin:/usr/local/go/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
script:
- export GOOGLE_CLOUD_PROJECT=YOUR_PROJECT
- testdir=$(pwd)/test
- cd $testdir
- apk add --no-cache gcc libc-dev bind-tools
- go test -v gcp_gcs_test.go