-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbitbucket-pipelines.yml
41 lines (38 loc) · 1.46 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
36
37
38
39
40
41
image: chaossumo/tf-provider-pipeline-runner:2022-05-11
pipelines:
default:
- step:
name: Go Lint
script:
- golangci-lint run -c .golangci.yml
- step:
name: Acceptance Test
script:
- TF_ACC=1 go test -v ./provider/tests/
custom:
PUBLISH_RELEASE_VERSION_GITHUB:
- variables:
- name: VERSION
- step:
image:
hashicorp/terraform:latest
script:
- BRANCH_NAME=$(git rev-parse --symbolic-full-name --abbrev-ref HEAD)
- if [[ $BRANCH_NAME != master ]]; then echo "This can only be performed on master branch" && exit 1; fi
- git pull origin master
- git remote add github [email protected]:ChaosSearch/terraform-provider-chaossearch.git
- git tag ${VERSION} && git push github ${VERSION}
- git push github master
SYNC_RELEASE_VERSION_BITBUCKET:
- variables:
- name: VERSION
- step:
image:
hashicorp/terraform:latest
script:
- BRANCH_NAME=$(git rev-parse --symbolic-full-name --abbrev-ref HEAD)
- if [[ $BRANCH_NAME != master ]]; then echo "This can only be performed on master branch" && exit 1; fi
- git remote add github [email protected]:ChaosSearch/terraform-provider-chaossearch.git
- git pull github master
- git tag ${VERSION} && git push github ${VERSION}
- git push origin master