-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.drone.yml
118 lines (107 loc) · 2.42 KB
/
.drone.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
kind: pipeline
type: docker
name: Localstack Terratest Test
trigger:
branch:
- main
services:
- name: localstack
image: localstack/localstack:0.14.3
steps:
- name: localstack wait
image: curlimages/curl:7.83.1
commands:
# Checks to see that localstack service is up and running
- until curl --fail --silent --max-time 1 http://localstack:4566/health; do echo -n . && sleep 1; done
- name: run tests
image: hashicorp/terraform:1.2.2
commands:
- apk add go
# copy AWS provider localstack overrides into place
- cp tests/aws-provider-localstack.tf test-provider.tf
- cd tests
- go test -v -run TestTerraformAwsNetworkExample
---
kind: pipeline
type: docker
name: Localstack Terraform CLI Test
trigger:
branch:
- main
services:
- name: localstack
image: localstack/localstack:0.14.3
steps:
- name: localstack wait
image: curlimages/curl:7.83.1
commands:
# Checks to see that localstack service is healthy
- until curl --fail --silent --max-time 1 http://localstack:4566/health; do echo -n . && sleep 1; done
- name: run tests
image: hashicorp/terraform:1.2.2
commands:
# copy AWS provider localstack overrides into place
- cp tests/aws-provider-localstack.tf tests/example/test-provider.tf
- terraform test
# disabling AWS tests for the talk
#
#---
#kind: pipeline
#type: docker
#name: AWS Terratest Test
#
#trigger:
# when:
# status:
# - failure
# - success
# branch:
# - main
#
#steps:
#
#- name: run tests
# image: hashicorp/terraform:1.2.2
# environment:
# AWS_ACCESS_KEY_ID: ASIARLPW64RANAXCCYHT
# AWS_SESSION_TOKEN:
# from_secret: aws_session_token
# AWS_SECRET_ACCESS_KEY:
# from_secret: aws_secret_access_key
# commands:
# - apk add go
# # copy AWS provider config into place
# - cp tests/aws-provider.tf test-provider.tf
# - cd tests
# - go test -v -run TestTerraformAwsNetworkExample
#
#---
#kind: pipeline
#type: docker
#name: AWS Terraform CLI Test
#
#depends_on:
#- "AWS Terratest Test"
#
#trigger:
# when:
# status:
# - failure
# - success
# branch:
# - main
#
#steps:
#
#- name: run tests
# image: hashicorp/terraform:1.2.2
# environment:
# AWS_ACCESS_KEY_ID: ASIARLPW64RANAXCCYHT
# AWS_SESSION_TOKEN:
# from_secret: aws_session_token
# AWS_SECRET_ACCESS_KEY:
# from_secret: aws_secret_access_key
# commands:
# # copy AWS provider config into place
# - cp tests/aws-provider.tf tests/example/test-provider.tf
# - terraform test