Skip to content

Commit ac84355

Browse files
ktdreyerclaude
andauthored
test "kustomize build" for overlays before merge (#841)
Three of our five overlays (`kind`, `kind-local`, `local-dev`) had no CI validation. They can easily break silently if we change something in shared base resources. Add basic syntax checking. Closes #840 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4a73e9c commit ac84355

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: kustomize-build
2+
on:
3+
pull_request:
4+
paths:
5+
- components/manifests/**
6+
- .github/workflows/kustomize-check.yml
7+
push:
8+
paths:
9+
- components/manifests/**
10+
- .github/workflows/kustomize-check.yml
11+
12+
workflow_dispatch:
13+
14+
concurrency:
15+
group: kustomize-build-${{ github.event.pull_request.number || github.ref }}
16+
cancel-in-progress: true
17+
18+
jobs:
19+
kustomize-build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v6
23+
24+
- name: Install oc
25+
uses: redhat-actions/openshift-tools-installer@v1
26+
with:
27+
oc: latest
28+
29+
- name: Build all overlays
30+
run: |
31+
failed=0
32+
for overlay in production e2e kind kind-local local-dev; do
33+
echo "=== $overlay ==="
34+
if oc kustomize "components/manifests/overlays/$overlay" > /dev/null; then
35+
echo "OK"
36+
else
37+
echo "FAILED"
38+
failed=1
39+
fi
40+
echo ""
41+
done
42+
43+
if [ "$failed" -eq 1 ]; then
44+
echo "ERROR: one or more overlays failed to build (see above)"
45+
exit 1
46+
fi
47+
echo "All overlays build successfully"

0 commit comments

Comments
 (0)