Skip to content

Commit ed2fc29

Browse files
committed
add devbox and pipeline image
1 parent 361f988 commit ed2fc29

File tree

4 files changed

+119
-4
lines changed

4 files changed

+119
-4
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ The best way to fully understand the CI/CD is to check its executions. Check the
4646
## Pipeline
4747
The deployment pipeline uses [GitHub Actions Environment](https://docs.github.com/en/actions/managing-workflow-runs-and-deployments/managing-deployments/managing-environments-for-deployment) to control deployment to environment (notice that `apply` jobs uses GitHub Actions Environment). We can also set up rules to deploy only to production after a manual approval.
4848

49+
![Pipeline](./docs/pipeline.png)
50+
4951
<!-- BEGIN_TF_DOCS -->
5052
## Requirements
5153

devbox.json

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,33 @@
33
"packages": [
44
"git@2.48.1",
55
"terraform@1.11.0",
6-
"terraform-docs@0.19.0"
6+
"terraform-docs@0.19.0",
7+
"trivy@0.59.1",
8+
"tflint@0.55.1"
79
],
810
"shell": {
911
"init_hook": [
1012
"echo 'Welcome to devbox!' > /dev/null"
1113
],
1214
"scripts": {
13-
"test": [
14-
"echo \"Error: no test specified\" && exit 1"
15+
"format": [
16+
"terraform fmt -recursive"
17+
],
18+
"scan": [
19+
"trivy config . --severity CRITICAL,HIGH --quiet",
20+
"cat trivy-result.txt"
21+
],
22+
"docs": [
23+
"terraform-docs ."
24+
],
25+
"lock": [
26+
"terraform init -backend=false",
27+
"terraform providers lock -platform=linux_amd64 -platform=darwin_amd64 -platform=darwin_arm64"
28+
],
29+
"lint": [
30+
"tflint --init",
31+
"tflint --recursive"
1532
]
1633
}
1734
}
18-
}
35+
}

devbox.lock

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,102 @@
171171
"store_path": "/nix/store/hk3y36laijnmf1fs5czgqql1kgkpg8zj-terraform-1.11.0"
172172
}
173173
}
174+
},
175+
"tflint@0.55.1": {
176+
"last_modified": "2025-02-07T11:26:36Z",
177+
"resolved": "github:NixOS/nixpkgs/d98abf5cf5914e5e4e9d57205e3af55ca90ffc1d#tflint",
178+
"source": "devbox-search",
179+
"version": "0.55.1",
180+
"systems": {
181+
"aarch64-darwin": {
182+
"outputs": [
183+
{
184+
"name": "out",
185+
"path": "/nix/store/68211bisbjwja8k9y2m25a1mpwzg8qkl-tflint-0.55.1",
186+
"default": true
187+
}
188+
],
189+
"store_path": "/nix/store/68211bisbjwja8k9y2m25a1mpwzg8qkl-tflint-0.55.1"
190+
},
191+
"aarch64-linux": {
192+
"outputs": [
193+
{
194+
"name": "out",
195+
"path": "/nix/store/0j1gmqwj26f77rv7v7fcq5f1l8fijjwg-tflint-0.55.1",
196+
"default": true
197+
}
198+
],
199+
"store_path": "/nix/store/0j1gmqwj26f77rv7v7fcq5f1l8fijjwg-tflint-0.55.1"
200+
},
201+
"x86_64-darwin": {
202+
"outputs": [
203+
{
204+
"name": "out",
205+
"path": "/nix/store/9sxdfdzhd3v400xir7apm5lqc4yx6wk3-tflint-0.55.1",
206+
"default": true
207+
}
208+
],
209+
"store_path": "/nix/store/9sxdfdzhd3v400xir7apm5lqc4yx6wk3-tflint-0.55.1"
210+
},
211+
"x86_64-linux": {
212+
"outputs": [
213+
{
214+
"name": "out",
215+
"path": "/nix/store/l0w06x7r6c419mxc4xdm954j7rlm7xvp-tflint-0.55.1",
216+
"default": true
217+
}
218+
],
219+
"store_path": "/nix/store/l0w06x7r6c419mxc4xdm954j7rlm7xvp-tflint-0.55.1"
220+
}
221+
}
222+
},
223+
"trivy@0.59.1": {
224+
"last_modified": "2025-02-07T20:06:47Z",
225+
"resolved": "github:NixOS/nixpkgs/e8d0b02af0958823c955aaab3c82b03f54411d91#trivy",
226+
"source": "devbox-search",
227+
"version": "0.59.1",
228+
"systems": {
229+
"aarch64-darwin": {
230+
"outputs": [
231+
{
232+
"name": "out",
233+
"path": "/nix/store/gggxl0lphp4jn4j1m76val7kdkl6pjvb-trivy-0.59.1",
234+
"default": true
235+
}
236+
],
237+
"store_path": "/nix/store/gggxl0lphp4jn4j1m76val7kdkl6pjvb-trivy-0.59.1"
238+
},
239+
"aarch64-linux": {
240+
"outputs": [
241+
{
242+
"name": "out",
243+
"path": "/nix/store/wyyb1yswn6kkj4vdmgxdf7di0wg9gh2b-trivy-0.59.1",
244+
"default": true
245+
}
246+
],
247+
"store_path": "/nix/store/wyyb1yswn6kkj4vdmgxdf7di0wg9gh2b-trivy-0.59.1"
248+
},
249+
"x86_64-darwin": {
250+
"outputs": [
251+
{
252+
"name": "out",
253+
"path": "/nix/store/b2rgpv6rabijzankipdj7agv5yxxnp6p-trivy-0.59.1",
254+
"default": true
255+
}
256+
],
257+
"store_path": "/nix/store/b2rgpv6rabijzankipdj7agv5yxxnp6p-trivy-0.59.1"
258+
},
259+
"x86_64-linux": {
260+
"outputs": [
261+
{
262+
"name": "out",
263+
"path": "/nix/store/rai7hscdn00w4q07dkhr31pw8i3cr060-trivy-0.59.1",
264+
"default": true
265+
}
266+
],
267+
"store_path": "/nix/store/rai7hscdn00w4q07dkhr31pw8i3cr060-trivy-0.59.1"
268+
}
269+
}
174270
}
175271
}
176272
}

docs/pipeline.png

181 KB
Loading

0 commit comments

Comments
 (0)