IONOS(ci): derive publish coordinate from ref and version (HDNEXT-2144) - #306
Merged
printminion-co merged 2 commits intoAug 14, 2026
Merged
Conversation
Add .github/scripts/derive-coordinate.sh, which maps a git ref plus the NC_VERSION that was actually built to the tuple saying where the build belongs: lane, train, Nextcloud major, downstream ref, chart path and chart version. Nothing consumes it yet; wiring it into the trigger and into the helm pipeline are later steps. Two properties it exists to hold: - The major comes from the artifact, never from the branch name. Where a branch name declares a major, that declaration becomes an assertion that fails the build on disagreement. This is the guard that was missing on 2026-07-29, when an NC32 build successfully triggered the v30 lane and only an unrelated apk pin conflict stopped it. - Every guard fails closed. An unrecognised ref, an empty or malformed NC_VERSION, or a declared major that disagrees with the artifact stops the pipeline. There is no default lane to fall back to. Both branch naming eras are accepted indefinitely: legacy rc/web-3.5, whose trailing number is a release counter and not a major, and the new rc/web-v<major>-<n> shape. The unsuffixed ionos-dev branch keeps working too, since retiring it comes later and failing it closed here would break the live dev build before that step arrives. Extracting this into a script rather than leaving it as inline pipeline shell is what makes it testable: a table of 48 cases covers every lane type, both naming eras, the 2026-07-29 regression and each fail-closed path, and runs offline with no pipeline and no registry. There was no shell test harness in this repo before, so the table brings its own. Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
…144) Run the derive-coordinate table and shellcheck on pull requests that touch .github/scripts, so the coordinate derivation stays verified without triggering a pipeline or touching a registry. shellcheck is scoped to the two files known to be clean rather than to .github/scripts/**, so that pre-existing findings in detect-app-cache.sh do not block merges. The list should widen as those are cleaned up. There was no shellcheck in this repo before this. Signed-off-by: Misha M.-Kupriyanov <kupriyanov@strato.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
.github/scripts/derive-coordinate.sh: given a git ref and theNC_VERSIONthat was actuallybuilt, it emits the tuple saying where that build belongs — lane, train, Nextcloud major, downstream
ref, chart path, chart version — or exits non-zero with a reason.
Nothing consumes it yet. Wiring it into the trigger and into the helm pipeline are separate,
later tickets. This PR delivers the unit and the proof that it behaves, so those tickets wire in
something already tested instead of growing more inline shell inside pipeline YAML.
Two properties it exists to hold:
major, the declaration becomes an assertion that fails the build on disagreement. This is the
guard that was missing on 2026-07-29, when an NC32 build successfully triggered the v30 lane and
only an unrelated apk pin conflict stopped it.
NC_VERSION, or adeclared major that disagrees with the artifact stops the pipeline. There is no default lane to
fall back to.
Both branch naming eras are accepted indefinitely — legacy
rc/web-3.5, whose trailing number is arelease counter rather than a major, and the new
rc/web-v<major>-<n>shape. Unsuffixedionos-devkeeps working too: retiring it is a later step, and failing it closed here would break the live dev
build before that step arrives.
Two things found while implementing
Both contradict assumptions in the spec and are worth carrying into the later tickets:
mainbranch — onlymaster, the fork-sync branch, which is not a deliverylane and now fails closed. The trunk that publishes a chart line is
mainin the image and helmrepos. The spec's "
mainbecomes the integration trunk" step is about helm'smain, not this repo's.ionos-dev-v32.0.6has since been deleted from origin to keep a single dev-lane shape, so onlyionos-dev-v<major>declares a major. A test pins the dotted form as unrecognised.Review notes
.github/scripts/tests/derive-coordinate.test.shis a table of 48 cases, runnable offline withno pipeline, no registry and no network: every lane type, both naming eras, the 2026-07-29
regression, and each fail-closed path. Every guard in the script is mutation-tested — deleting any
one of them turns the table red.
shellcheck is deliberately scoped to the two new files rather than
.github/scripts/**, becausedetect-app-cache.shhas 15 pre-existing findings that would block merges. The list should widenas those are cleaned up.
ionos-dev-v31. The other lanes need cherry-picks — which isthe branch divergence that
nc-docs-and-tools#193
addresses.
hidrive-next-build, because.github/workflows/**is in that workflow'spull_requestpaths filter. Expected, not caused by this change.Checklist
nc-docs-and-tools