-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbitbucket-pipelines.yml
44 lines (40 loc) · 1.15 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
42
43
44
image: adaptavist/all-tools:openjdk11-latest-1.4.6
definitions:
check: &check
name: Check HCL
script:
- (echo ${PIPELINE_GIT_PRIVATE_KEY} | base64 -d >> ~/.ssh/id_rsa) && chmod 0600 ~/.ssh/id_rsa
- terraform fmt -check -recursive -diff
integration-tests: &integration-tests
name: Integration Tests
script:
- (apk add --update go)
- (cd test && AWS_ACCESS_KEY_ID="${TF_TEST_AWS_ACCESS_KEY_ID}" AWS_SECRET_ACCESS_KEY="${TF_TEST_AWS_SECRET_ACCESS_KEY}" go test -timeout 60m)
compliance: &compliance
name: Compliance
image:
name: bridgecrew/checkov:latest
entrypoint:
- '/usr/bin/env'
- 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
script:
- checkov -d . -s
release: &release
name: Release
image: node:13
caches:
- node
script:
- npm install --save-dev
- npx semantic-release -r ${BITBUCKET_GIT_HTTP_ORIGIN}
pipelines:
default:
- step: *check
- step: *compliance
- step: *integration-tests
branches:
master:
- step: *check
- step: *compliance
- step: *integration-tests
- step: *release