Skip to content

ci: publish every merge to main as a 0.0.0-main build - #1167

Merged
railgrid-prow[bot] merged 1 commit into
railgrid:mainfrom
mjudeikis:main-builds
Nov 15, 2026
Merged

railgrid-prow[bot] merged 1 commit into
railgrid:mainfrom
mjudeikis:main-builds

Conversation

@mjudeikis

Copy link
Copy Markdown
Contributor

railgrid-dev is moving from following release tags to running what is on main. Today a merge to main publishes nothing deployable: provider images and charts go out only on release tags, and helm-images.yaml pushes a 0.0.0-<sha> hub chart whose image is never built.

What this adds

main-builds.yaml runs on every push to main. For each component with a chart (hub, agent, every provider) whose build context changed, it publishes:

Coordinate
image ghcr.io/railgrid/<image>:sha-<commit> immutable
chart oci://ghcr.io/railgrid/charts/<chart>, version 0.0.0-main, appVersion sha-<commit> overwritten by each build

Flux follows the one chart tag by digest. Because the chart's appVersion (the default image.tag) names an immutable image, each build changes the pod spec and rolls the workload. A mutable image tag such as :latest would not: nothing in the Deployment changes, so nothing restarts. A chart version per commit does not work either, since commit hashes do not sort by time.

0.0.0-main is a semver prerelease, so the release ranges production follows never match it. Releases themselves are untouched.

Selection

hack/ci/main_builds.py compares HEAD with the commit each component's published 0.0.0-main chart was built from (its appVersion), not with the previous push. A failed run, or a queued run dropped in favour of a newer one, is made up for by the next push, and a component that has never been published is built the first time the workflow runs. So the first run after this merges builds all nine.

  • A provider is rebuilt when its matrices.json inputs changed.
  • The hub and agent are rebuilt when anything outside providers/ and the documentation changed.
  • A change to the workflow, the script or matrices.json rebuilds everything, as does a manual run with all.

Runs are serialized (concurrency: main-builds) so an older build cannot overwrite 0.0.0-main after a newer one.

Other changes

  • helm-images.yaml publishes on v* tags only; its per-merge 0.0.0-<sha> chart is replaced by the above.
  • make verify-workflows lints the new workflow; hack/ci/README.md documents it.

Limits

  • linux/amd64 only. The builds exist for railgrid-dev, whose nodes are all amd64; releases stay multi-arch.
  • The infrastructure provider's companion images (dev-agent, universal-dev, access-proxy) are not built. A main build of the provider is not a release version, so it falls back to its unreleased defaults for them (:latest, the last release).
  • Cost: one image build per changed component per merge, with the same layer-cache scopes the release workflows read.

Testing

  • make verify-ci-selection (48 tests, 15 new in test_main_builds.py) and make verify-workflows pass locally.
  • Packaged the hub and code charts with --version 0.0.0-main --app-version sha-… and confirmed the rendered image is …:sha-….
  • The workflow itself cannot run before it is on main. After merging, check that the first run publishes all nine components and that a second, provider-only merge builds just that provider.

The railgrid-dev side is a PR in railgrid/ops, to be merged after the first run here has published.

railgrid-dev should run what is on main, not what was last tagged. Until
now a merge to main published nothing deployable: provider images and
charts only went out on release tags, and helm-images.yaml pushed a
0.0.0-<sha> hub chart whose image was never built.

main-builds.yaml publishes, for each component whose build context
changed, the image as sha-<commit> and the chart at the fixed version
0.0.0-main with that tag as its appVersion. Flux follows the one chart tag
by digest; because the image tag is immutable, every build changes the pod
spec and rolls the workload, which a mutable :latest image would not.
0.0.0-main is a prerelease, so the release ranges production follows never
match it.

Selection (hack/ci/main_builds.py) compares HEAD with the commit each
published chart was built from rather than with the previous push, so a
failed or superseded run is made up for by the next one. Runs are
serialized so an older build cannot overwrite a newer one. amd64 only.

helm-images.yaml now publishes on v* tags only.
@mjudeikis
mjudeikis requested a review from cwilhit as a code owner November 15, 2026 06:29
@mjudeikis

Copy link
Copy Markdown
Contributor Author

/approve

@railgrid-prow

railgrid-prow Bot commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mjudeikis

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@railgrid-prow
railgrid-prow Bot merged commit ca934c9 into railgrid:main Nov 15, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant