Skip to content

Commit 483b313

Browse files
committed
DND-1418: don't vendor the comet-common subchart; resolve it in CI
Git-ignore charts/s3proxy/charts/ and stop checking in the resolved comet-common-0.3.0.tgz. Chart.lock (committed) pins the version/digest, and each workflow that renders, installs, or packages the chart now runs `helm dependency build charts/s3proxy` first. comet-common's OCI package is anonymously pullable, so this needs no registry auth and still works on fork PRs. - .gitignore: ignore charts/s3proxy/charts/. - lint-render / functional-test / release: add a "Build chart dependencies" step after Set up Helm (release also gains a Set up Helm step). - helm-diff: build deps for whichever side (base/head) has a Chart.lock before rendering (base may predate the dependency). Verified: removing the local .tgz and running `helm dependency build` from Chart.lock repopulates it and the chart renders; actionlint clean on the changed render/install workflows; helm-polish clean.
1 parent 53b30e3 commit 483b313

7 files changed

Lines changed: 39 additions & 2 deletions

File tree

.github/workflows/functional-test.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ jobs:
7171
with:
7272
version: v3.19.2
7373

74+
- name: Build chart dependencies
75+
# comet-common is not vendored in-repo; resolve it from Chart.lock
76+
# (anonymous OCI pull, no auth needed).
77+
run: helm dependency build charts/s3proxy
78+
7479
- name: Create kind cluster
7580
uses: helm/kind-action@ef37e7f390d99f746eb8b610417061a60e82a6cc # v1.14.0
7681

.github/workflows/helm-diff.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@ jobs:
4848
with:
4949
version: v3.19.2
5050

51+
- name: Build chart dependencies
52+
# comet-common is not vendored in-repo; resolve it from Chart.lock on each
53+
# side that has one (base may predate the dependency), before rendering.
54+
run: |
55+
for dir in base-repo pr-repo
56+
do
57+
if [ -f "${dir}/${CHART_PATH}/Chart.lock" ]
58+
then
59+
helm dependency build "${dir}/${CHART_PATH}"
60+
fi
61+
done
62+
5163
- name: Render and diff
5264
run: |
5365
set -uo pipefail

.github/workflows/lint-render.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ jobs:
4545
with:
4646
version: v3.19.2
4747

48+
- name: Build chart dependencies
49+
# comet-common is not vendored in-repo; resolve it from Chart.lock
50+
# (anonymous OCI pull, no auth needed).
51+
run: helm dependency build charts/s3proxy
52+
4853
- name: Helm lint
4954
run: helm lint charts/s3proxy --values "${{ matrix.values }}"
5055

.github/workflows/release.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,16 @@ jobs:
8181
run: |
8282
cp README.md charts/s3proxy/
8383
84+
- name: Set up Helm
85+
uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
86+
with:
87+
version: v3.19.2
88+
89+
- name: Build chart dependencies
90+
# comet-common is not vendored in-repo; resolve it from Chart.lock
91+
# (anonymous OCI pull) so chart-releaser can package the chart.
92+
run: helm dependency build charts/s3proxy
93+
8494
- name: Run chart-releaser
8595
uses: bitdeps/helm-oci-charts-releaser@v0.1.3
8696
with:

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Vendored Helm chart dependencies. Not checked in; resolved from Chart.lock via
2+
# `helm dependency build` (CI does this before lint/template/install/package).
3+
charts/s3proxy/charts/

charts/s3proxy/Chart.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ version: 0.2.0
2424
appVersion: "3.3.0"
2525

2626
# comet-common is a library chart of shared helpers (names, labels, images, ...)
27-
# used across Comet charts. Vendored in-repo (charts/*.tgz + Chart.lock) so CI and
28-
# fork PRs resolve it without registry access.
27+
# used across Comet charts. The resolved dependency (charts/*.tgz) is git-ignored,
28+
# not checked in; Chart.lock pins the version/digest and CI runs
29+
# `helm dependency build` (anonymous OCI pull, no auth) before lint/template/
30+
# install/package.
2931
dependencies:
3032
- name: comet-common
3133
version: "0.3.0"
-19.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)