-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathazure-pipelines.yml
31 lines (23 loc) · 1.22 KB
/
azure-pipelines.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
---
trigger:
branches:
include:
- '*'
pool:
vmImage: 'Ubuntu-16.04'
variables:
- group: 'Terraform'
steps:
- script: cp ./tests/integration_test.yml ./extensions/integration_test.yml
displayName: 'Copy test script'
- script: |
ln -sf ./../terraform.backend.consul.tf ./aws/terraform.tf
terraform init -backend-config="key=state/ci-$(Build.BuildNumber)" -backend-config="access_key=$(access_key)" -backend-config="secret_key=$(secret_key)" -reconfigure ./terraform/aws
displayName: 'Terraform init'
- script: terraform plan -var lidop_name=ci-$(Build.BuildNumber) -var cloud=aws -var workers=1 -var access_key=$(access_key) -var secret_key=$(secret_key) -var password=$(password) ./terraform/aws
displayName: 'Terraform plan'
- script: terraform apply -auto-approve -var lidop_name=ci-$(Build.BuildNumber) -var cloud=aws -var workers=1 -var access_key=$(access_key) -var secret_key=$(secret_key) -var password=$(password) ./terraform/aws
displayName: 'Terraform apply'
- script: terraform destroy -auto-approve -var lidop_name=ci-$(Build.BuildNumber) -var access_key=$(access_key) -var secret_key=$(secret_key) -var password=$(password) ./terraform/aws
displayName: 'Terraform destroy'
condition: always()