1
+ name : BVSTACK CI Pipeline
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ - actions
8
+ pull_request :
9
+ branches :
10
+ - main
11
+
12
+ env :
13
+ VAULT_ADDR : ${{ vars.VAULT_ADDR }}
14
+ VAULT_TOKEN : ${{ vars.VAULT_TOKEN }}
15
+ BOUNDARY_ADDR : ${{ vars.BOUNDARY_ADDR }}
16
+
17
+ jobs :
18
+ lint-boundary-terraform :
19
+ runs-on : ubuntu-latest
20
+ defaults :
21
+ run :
22
+ working-directory : " boundary/terraform/"
23
+ steps :
24
+ - name : Checkout code
25
+ uses : actions/checkout@v4
26
+
27
+ - name : setup terraform cli
28
+ uses : hashicorp/setup-terraform@v3
29
+
30
+ - name : Terraform fmt
31
+ id : fmt
32
+ run : terraform fmt -check
33
+ continue-on-error : true
34
+
35
+ - name : Terraform Init
36
+ id : init
37
+ run : terraform init
38
+
39
+ - name : Terraform Validate
40
+ id : validate
41
+ run : terraform validate -no-color
42
+
43
+ - name : validate stdout
44
+ run : echo "${{ steps.validate.outputs.stdout }}"
45
+
46
+ - name : validate sterr
47
+ run : echo "${{ steps.validate.outputs.stderr }}"
48
+
49
+ - name : validate exitcode
50
+ run : echo "${{ steps.validate.outputs.exitcode }}"
51
+
52
+ lint-vault-terraform :
53
+ runs-on : ubuntu-latest
54
+ defaults :
55
+ run :
56
+ working-directory : " vault/terraform/"
57
+ steps :
58
+ - name : Checkout code
59
+ uses : actions/checkout@v4
60
+
61
+ - name : setup terraform cli
62
+ uses : hashicorp/setup-terraform@v3
63
+
64
+ - name : Terraform fmt
65
+ id : fmt
66
+ run : terraform fmt -check
67
+ continue-on-error : true
68
+
69
+ - name : Terraform Init
70
+ id : init
71
+ run : terraform init
72
+
73
+ - name : Terraform Validate
74
+ id : validate
75
+ run : terraform validate -no-color
76
+
77
+ - run : echo ${{ steps.plan.outputs.stdout }}
78
+ - run : echo ${{ steps.plan.outputs.stderr }}
79
+ - run : echo ${{ steps.plan.outputs.exitcode }}
80
+
81
+ lint-ansible :
82
+ runs-on : ubuntu-latest
83
+ defaults :
84
+ run :
85
+ working-directory : ./scripts
86
+ shell : bash
87
+ steps :
88
+ - name : Checkout code
89
+ uses : actions/checkout@v4
90
+
91
+ - name : setup python
92
+ uses : actions/setup-python@v5
93
+ with :
94
+ python-version : ' 3.10'
95
+ cache : ' pip'
96
+
97
+ - name : install ansible
98
+ run : |
99
+ pip install -U pip
100
+ pip install ansible wheel
101
+
102
+ - name : check playbook and role's syntax
103
+ run : bash linter.sh ansible
0 commit comments