ci: publish Helm charts in a dedicated job gated on image builds#7046
ci: publish Helm charts in a dedicated job gated on image builds#7046TheRealShek wants to merge 1 commit into
Conversation
Move the Helm chart publish out of the artifacts matrix into a separate `charts` job with `needs: artifacts`, mirroring publish_pipedv1_exp.yaml. Charts now publish exactly once, only after every image has been pushed, and a failed image build blocks the publish. Repoint the downstream trigger-event-watcher and release-quickstart-manifests jobs to needs: charts. Fixes pipe-cd#6999 Signed-off-by: TheRealShek <shadow.abhi100@gmail.com>
|
👋 Hi @TheRealShek, welcome to PipeCD and thanks for opening your first pull request! We’re really happy to have you here Before your PR gets merged, please check a few important things below. Helpful resources
DCO Sign-offAll commits must include a In case you forget to sign-off your commit(s), follow these steps: For the last commit: git commit --amend --signoff
git push --force-with-leaseFor multiple commits: git rebase --signoff origin/master
git push --force-with-leaseRun checks locallyBefore pushing updates, please run: make checkThis runs the same checks as CI and helps catch issues early. 💬 Need help?If anything is unclear, feel free to ask in this PR or join us on the CNCF Slack in the #pipecd channel. Thanks for contributing to PipeCD! ❤️ |
|
@TheRealShek Please mind getting assigned before opening a PR, this is okay for now as it is your first contribution here but please from next time be careful! |
What this does
Moves the Helm chart publish out of the
artifactsmatrix job into a dedicatedchartsjob gated onneeds: artifacts, mirroring the structurepublish_pipedv1_exp.yamlalready uses (container_image_build→image_chart).Fixes #6999.
Problem
In
publish_image_chart.yaml, theInstall helm/Login to OCI using Helm/Publish helm chartssteps live inside theartifactsmatrix job. That matrix runs ~10 parallel cells, so:Publish helm charts, and each one pushes all three charts (pipecd,piped,helloworld) to the sameoci://ghcr.io/pipe-cd/chartref — up to 10 redundant, concurrent pushes per run (a source of flaky "failed, passed on re-run" CI).helloworld) publishes thepipecd/pipedcharts while those images are still building in slower cells → a window where the registry serves a chart whose image tag doesn't exist yet (ImagePullBackOff).Evidence
From run
#29642136136(all onghcr.io, which the default charts reference):Publish helm chartsdoneghcr.io/pipe-cd, launcherghcr.io/pipe-cd, pipedghcr.io/pipe-cd, pipecdThe
launchercell published thepiped/pipecdcharts ~30s before those images finished pushing to ghcr. (On the gcr mirror thepipedimage lagged by ~7m44s, affecting installs that overrideimage.repositoryto gcr.)Fix
chartsjob withneeds: artifacts— GitHub starts it only after every matrix cell succeeds, so charts publish once, only after all images exist, and never if a build fails.trigger-event-watcherandrelease-quickstart-manifeststoneeds: charts(the latter runshelm templateagainst the just-published chart, so it must wait for the chart push).Testing
actionlint— clean, aside from the pre-existingoracle-vm-8cpu-32gb-x86-64custom self-hosted runner-label warning on the unchangedartifactsjob.artifacts→charts→trigger-event-watcher/release-quickstart-manifests.Opened as a draft for maintainer feedback.