-
Notifications
You must be signed in to change notification settings - Fork 96
/
bitbucket-pipelines.yml
35 lines (32 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
31
32
33
34
35
# Copyright 2024 Terramate GmbH
# SPDX-License-Identifier: MPL-2.0
image: golang
clone:
enabled: true
depth: full
pipelines:
pull-requests:
'**':
- step:
name: 'build Terramate'
script:
- make build
- go install github.com/hashicorp/hc-install/cmd/hc-install@latest
- hc-install install -version 1.6.0 terraform
- cp ./terraform /usr/local/bin/terraform
- ./bin/terramate run --changed -- terraform init
- export TMC_API_DEBUG=1
- ./bin/terramate run --changed --sync-preview --terraform-plan-file=out.tfplan --target linux-go-packages --parallel 12 -- terraform plan -detailed-exitcode -out=out.tfplan
branches:
main:
- step:
name: 'build Terramate'
script:
- make build
- go install github.com/hashicorp/hc-install/cmd/hc-install@latest
- hc-install install -version 1.6.0 terraform
- cp ./terraform /usr/local/bin/terraform
- ./bin/terramate run --changed -- terraform init
- export TMC_API_DEBUG=1
- ./bin/terramate run --changed --sync-deployment --terraform-plan-file=out.tfplan --target linux-go-packages --parallel 12 -- terraform plan -out=out.tfplan
- ./bin/terramate run --changed --sync-drift-status --target linux-go-packages --terraform-plan-file=out.tfplan -- terraform plan -detailed-exitcode -out=out.tfplan