Skip to content

fix(ci): publish the Helm chart only after the image - #181

Open
TheMeinerLP wants to merge 1 commit into
mainfrom
fix/publish-chart-after-image
Open

fix(ci): publish the Helm chart only after the image#181
TheMeinerLP wants to merge 1 commit into
mainfrom
fix/publish-chart-after-image

Conversation

@TheMeinerLP

Copy link
Copy Markdown
Contributor

Proposed changes

The helm job only depended on release-please, so it ran in parallel with the image build:

job depends on takes
build-context release-please Gradle build
docker release-please, build-context minutes (image build, chunked Harbor upload, cosign)
helm release-please seconds (helm package + helm push)

The chart is packaged with the release version as its appVersion, so it was reliably published pointing at an image tag that did not exist yet. Flux pulling in that window gets ImagePullBackOff — and if the image build fails outright, a chart referencing an image that will never exist stays published. The gap is wider here than in stelaris because docker additionally waits for build-context.

Adding docker to needs closes it. Since needs implies success and the helm job has no always(), a failed or skipped docker job now skips the chart as well — which is what should happen. The if condition is unchanged; needs.release-please.outputs still resolves, and a workflow_dispatch run still skips the chart because release_created is not true there.

Same fix as OneLiteFeatherNET/stelaris#136.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING.md
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

Not covered by tests — the ordering only shows up in a real release run. It can be confirmed on the next release: the Publish the Helm chart job must start only after Build Docker Artifacts has finished.

Trade-off: the chart push now waits for the image build, so a release takes longer end to end. That is the intended semantics.

🤖 Generated with Claude Code

The helm job only depended on release-please, so it ran in parallel with
the image build. Packaging and pushing a chart takes seconds while the
build context, image build, chunked Harbor upload and signing take
minutes, so the chart was reliably published pointing at an appVersion
whose image did not exist yet - and stayed published even when the image
build failed.

Depend on the docker job as well, which also gates the chart on that job
succeeding.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Test results

 42 files   42 suites   5s ⏱️
 79 tests  67 ✅ 12 💤 0 ❌
237 runs  201 ✅ 36 💤 0 ❌

Results for commit fddec93.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant