-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitbucket-pipelines.yml
30 lines (30 loc) · 1.44 KB
/
bitbucket-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
image: hashicorp/terraform:1.8.3
pipelines:
pull-requests:
'**': # this trigger will make the pipeline run for all Pull Requests
- step:
script:
- cd aws-stag
- terraform init
- terraform validate
- terraform plan -json -out=tf.plan > plan_log.jsonl && terraform show -json tf.plan > plan_output.json || true
- apk add curl
- curl -O https://gofirefly-prod-iac-ci-cli-binaries.s3.amazonaws.com/fireflyci/latest/fireflyci_Linux_x86_64.tar.gz
- tar -xf fireflyci_Linux_x86_64.tar.gz
- chmod a+x fireflyci
- ./fireflyci post-plan -l plan_log.jsonl -f plan_output.json --workspace aws-stag
branches:
main:
- step:
script:
- cd aws-stag
- terraform init
- terraform validate
- terraform plan -json -out=tf.plan > plan_log.jsonl && terraform show -json tf.plan > plan_output.json || true
- apk add curl
- curl -O https://gofirefly-prod-iac-ci-cli-binaries.s3.amazonaws.com/fireflyci/latest/fireflyci_Linux_x86_64.tar.gz
- tar -xf fireflyci_Linux_x86_64.tar.gz
- chmod a+x fireflyci
- ./fireflyci post-plan -l plan_log.jsonl -f plan_output.json --workspace aws-stag
- terraform apply -auto-approve -json > apply_log.jsonl || true
- ./fireflyci post-apply -f apply_log.jsonl --workspace aws-stag