Skip to content

Commit a199da2

Browse files
authored
Improve local CI checks (#2804)
Signed-off-by: jose.vazquez <[email protected]>
1 parent cc16f33 commit a199da2

File tree

3 files changed

+123
-3
lines changed

3 files changed

+123
-3
lines changed

Makefile

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,9 @@ HELM_AKO_NAMESPACE = $(OPERATOR_NAMESPACE)
145145

146146
GH_RUN_ID=$(shell gh run list -w Test -b main -e schedule -s success --json databaseId | jq '.[0] | .databaseId')
147147

148-
SBOMS_DIR ?= temp
148+
SBOMS_DIR ?= template
149+
150+
SHELLCHECK_OPTIONS ?= -e SC2086
149151

150152
.DEFAULT_GOAL := help
151153
.PHONY: help
@@ -672,8 +674,28 @@ bump-version-file:
672674

673675
.PHONY: api-docs
674676
api-docs: manifests
675-
go tool -modfile=tools/toolbox/go.mod crdoc --resources config/crd/bases --output docs/api-docs.md
677+
go tool -modfile=tools/toolbox/go.mod crdoc --resources config/crd/bases --output docs/api-docs.md
676678

677679
.PHONY: validate-api-docs
678680
validate-api-docs: api-docs
679681
$(MAKE) check-missing-files
682+
683+
.PHONY: addlicenses
684+
addlicense-check:
685+
addlicense -check -l apache -c "MongoDB Inc" \
686+
-ignore "**/*.md" \
687+
-ignore "**/*.yaml" \
688+
-ignore "**/*.yml" \
689+
-ignore "**/*.nix" \
690+
-ignore "tools/**" \
691+
-ignore ".devbox/**" \
692+
-ignore "**/*Dockerfile" .
693+
694+
.PHONY: shellcheck
695+
shellcheck:
696+
fd --type f --extension sh --extension bash --extension ksh . | \
697+
xargs shellcheck --color=always $(SHELLCHECK_OPTIONS)
698+
699+
.PHONY: ci
700+
ci: fmt validate-manifests api-docs check-licenses addlicense-check unit-test lint shellcheck
701+
@echo "✅ CI PASSED all checks"

devbox.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
"go-mockery@2",
2727
"docker-sbom@latest",
2828
"openshift@latest",
29-
"gh@latest"
29+
"gh@latest",
30+
"addlicense@latest",
31+
"fd@latest"
3032
]
3133
}

devbox.lock

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,54 @@
4949
}
5050
}
5151
},
52+
"addlicense@latest": {
53+
"last_modified": "2025-09-18T16:33:27Z",
54+
"resolved": "github:NixOS/nixpkgs/f4b140d5b253f5e2a1ff4e5506edbf8267724bde#addlicense",
55+
"source": "devbox-search",
56+
"version": "1.2.0",
57+
"systems": {
58+
"aarch64-darwin": {
59+
"outputs": [
60+
{
61+
"name": "out",
62+
"path": "/nix/store/k2zr0frs20q19wafpi01swzpbas9h9lq-addlicense-1.2.0",
63+
"default": true
64+
}
65+
],
66+
"store_path": "/nix/store/k2zr0frs20q19wafpi01swzpbas9h9lq-addlicense-1.2.0"
67+
},
68+
"aarch64-linux": {
69+
"outputs": [
70+
{
71+
"name": "out",
72+
"path": "/nix/store/kb38c0hy7qfwmkd7h3n0zx4yl854bcvb-addlicense-1.2.0",
73+
"default": true
74+
}
75+
],
76+
"store_path": "/nix/store/kb38c0hy7qfwmkd7h3n0zx4yl854bcvb-addlicense-1.2.0"
77+
},
78+
"x86_64-darwin": {
79+
"outputs": [
80+
{
81+
"name": "out",
82+
"path": "/nix/store/ahazfz8gz3vmhl6nkmad0sxhvn55va8b-addlicense-1.2.0",
83+
"default": true
84+
}
85+
],
86+
"store_path": "/nix/store/ahazfz8gz3vmhl6nkmad0sxhvn55va8b-addlicense-1.2.0"
87+
},
88+
"x86_64-linux": {
89+
"outputs": [
90+
{
91+
"name": "out",
92+
"path": "/nix/store/l8jpkpkksxa0z86rvbl8spz4iwxf5g88-addlicense-1.2.0",
93+
"default": true
94+
}
95+
],
96+
"store_path": "/nix/store/l8jpkpkksxa0z86rvbl8spz4iwxf5g88-addlicense-1.2.0"
97+
}
98+
}
99+
},
52100
"awscli2@latest": {
53101
"last_modified": "2025-09-18T16:33:27Z",
54102
"resolved": "github:NixOS/nixpkgs/f4b140d5b253f5e2a1ff4e5506edbf8267724bde#awscli2",
@@ -257,6 +305,54 @@
257305
}
258306
}
259307
},
308+
"fd@latest": {
309+
"last_modified": "2025-09-18T16:33:27Z",
310+
"resolved": "github:NixOS/nixpkgs/f4b140d5b253f5e2a1ff4e5506edbf8267724bde#fd",
311+
"source": "devbox-search",
312+
"version": "10.3.0",
313+
"systems": {
314+
"aarch64-darwin": {
315+
"outputs": [
316+
{
317+
"name": "out",
318+
"path": "/nix/store/glkzsfqgjp9bx6hia74abfqa9wsczfx7-fd-10.3.0",
319+
"default": true
320+
}
321+
],
322+
"store_path": "/nix/store/glkzsfqgjp9bx6hia74abfqa9wsczfx7-fd-10.3.0"
323+
},
324+
"aarch64-linux": {
325+
"outputs": [
326+
{
327+
"name": "out",
328+
"path": "/nix/store/5knx1nr9z2hli0zdq4h862ld5hniv8mp-fd-10.3.0",
329+
"default": true
330+
}
331+
],
332+
"store_path": "/nix/store/5knx1nr9z2hli0zdq4h862ld5hniv8mp-fd-10.3.0"
333+
},
334+
"x86_64-darwin": {
335+
"outputs": [
336+
{
337+
"name": "out",
338+
"path": "/nix/store/zps336phz86q9lyxkpm66jg8k1qlnvc0-fd-10.3.0",
339+
"default": true
340+
}
341+
],
342+
"store_path": "/nix/store/zps336phz86q9lyxkpm66jg8k1qlnvc0-fd-10.3.0"
343+
},
344+
"x86_64-linux": {
345+
"outputs": [
346+
{
347+
"name": "out",
348+
"path": "/nix/store/f5p1y2d1i025kbnikf9p7m2q3sm3gpnd-fd-10.3.0",
349+
"default": true
350+
}
351+
],
352+
"store_path": "/nix/store/f5p1y2d1i025kbnikf9p7m2q3sm3gpnd-fd-10.3.0"
353+
}
354+
}
355+
},
260356
"gettext@latest": {
261357
"last_modified": "2025-09-18T16:33:27Z",
262358
"resolved": "github:NixOS/nixpkgs/f4b140d5b253f5e2a1ff4e5506edbf8267724bde#gettext",

0 commit comments

Comments
 (0)