mirror of
https://github.com/cozystack/cozystack.git
synced 2026-12-02 21:30:46 +09:00
fix(ci): push the stable chart once, so a re-run keeps cozy-installer:X.Y.Z
Since finalize publishes the release page last, a run that fails in Publish draft release is re-run after the chart is already pushed. The re-run packaged and pushed the chart again, and helm package does not give the same bytes twice (two packagings of the same tree with different file times give two digests), so cozy-installer:X.Y.Z moved to another digest. The chart step now pushes only when the registry answers that cozy- installer:X.Y.Z is missing, read as manifest_digest in hack/promote- retag.sh reads it; any other lookup error fails the step instead of being taken for a missing tag. cozy-installer:latest still follows the latest decision on every run. A bats test runs the step against stub skopeo, helm and yq: the first run pushes once, a re-run pushes nothing, an older patch leaves latest alone, a failed push fails the step, and a failed lookup fails it without packaging or pushing. Fixes:e1472e58de("fix(ci): publish the release only after the stable images and chart exist") Assisted-by: LLM Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com> (cherry picked from commite99a15dbee)
This commit is contained in:
3 files changed
+90
-15
No files matched your search
+1
-1
@@ -549,7 +549,7 @@ Published tags are **write-once** — once a `vX.Y.Z` or rc tag is pushed it is
|
||||
|
||||
| File | Tag / branch handling |
|
||||
|------|------------------------|
|
||||
| [`pull-requests-release.yaml`](../.github/workflows/pull-requests-release.yaml) | Creates `vX.Y.Z` at the PR merge commit **write-once** (create if absent, no-op if unchanged, fail loudly if it would move — the merge commit is new, so there is nothing to move). Cuts the `api/apps/v1alpha1/<vTAG>` Go-submodule tag write-once at the same commit, **stable only** (never rc/beta/alpha). The `release-X.Y` maintenance branch is fast-forward-only. Retags the rc image digests to the stable image tag (also write-once at the image level). |
|
||||
| [`pull-requests-release.yaml`](../.github/workflows/pull-requests-release.yaml) | Creates `vX.Y.Z` at the PR merge commit **write-once** (create if absent, no-op if unchanged, fail loudly if it would move — the merge commit is new, so there is nothing to move). Cuts the `api/apps/v1alpha1/<vTAG>` Go-submodule tag write-once at the same commit, **stable only** (never rc/beta/alpha). The `release-X.Y` maintenance branch is fast-forward-only. Retags the rc image digests to the stable image tag (also write-once at the image level). Pushes the stable `cozy-installer` chart once: `helm package` does not give the same bytes twice, so a re-run that finds `cozy-installer:X.Y.Z` in the registry keeps it rather than moving the tag to another digest; a chart that went out wrong is replaced by deleting `cozy-installer:X.Y.Z` in GHCR before the re-run. A lookup that fails for any other reason than a missing tag fails the step. |
|
||||
| [`tags.yaml`](../.github/workflows/tags.yaml) | The `release-X.Y.Z-rc.N` staging branch is a mutable staging ref (compare-before-force: skipped when unchanged, force+log only when it genuinely moves). Fails fast on a stable `vX.Y.Z` tag with no pre-existing draft — stable tags come from `promote-rc.yaml`, never a hand push. |
|
||||
| [`promote-rc.yaml`](../.github/workflows/promote-rc.yaml) | Mutates no tags. Stages the `release-X.Y.Z` branch and opens the promote PR; the stable tag and the image retag both happen at merge (finalize). |
|
||||
|
||||
|
||||
Reference in new issue
Block a user