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 (#5486)
## What this PR does Since #5169 finalize publishes the release page last, so a run that fails in `Publish draft release` gets re-run after the chart is already pushed. The re-run packaged and pushed the chart again, and `helm package` doesn't give the same bytes twice (I packaged the same tree twice with different file times and got two digests), so `cozy-installer:X.Y.Z` moved to another digest. Now the chart step pushes only when `cozy-installer:X.Y.Z` is not in the registry yet. `cozy-installer:latest` still follows the latest decision on every run. The test runs the step against stub skopeo, helm and yq: first run pushes once, re-run pushes nothing, older patch leaves latest alone, failed push fails the step. Lines get this in own PRs: #5487 (release-1.7) and #5488 (release-1.6). ### Downstream repositories - [x] No downstream repository is affected by this change - [ ] [cozystack/website](https://github.com/cozystack/website) - follow-up: - [ ] [cozystack/terraform-provider-cozystack](https://github.com/cozystack/terraform-provider-cozystack) - follow-up: - [ ] [cozystack/ansible-cozystack](https://github.com/cozystack/ansible-cozystack) - follow-up: - [ ] [cozystack/ccp](https://github.com/cozystack/ccp) - follow-up: - [ ] [cozystack/talm](https://github.com/cozystack/talm) - follow-up: - [ ] [cozystack/cozyhr](https://github.com/cozystack/cozyhr) - follow-up: - [ ] [cozystack/cozy-proxy](https://github.com/cozystack/cozy-proxy) - follow-up: - [ ] [cozystack/cozystack-telemetry-server](https://github.com/cozystack/cozystack-telemetry-server) - follow-up: - [ ] [cozystack/external-apps-example](https://github.com/cozystack/external-apps-example) - follow-up: - [ ] [cozystack/examples](https://github.com/cozystack/examples) - follow-up: - [ ] [cozystack/community](https://github.com/cozystack/community) - follow-up: ### Release note ```release-note fix(ci): a re-run of finalize no longer pushes the stable cozy-installer chart again, so cozy-installer:X.Y.Z keeps the digest of its first push ``` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## Summary by CodeRabbit * **Chores** * Stable installer chart versions are preserved once published. Re-running a release will not replace an existing version; correcting a published chart requires removing it from the registry before rerunning. * If a version is missing, the release can publish it. Registry lookup or publishing errors stop the release. When configured, the `latest` tag is updated even if the versioned chart already exists. * **Documentation** * Clarified the policy for publishing stable chart versions and handling existing charts. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
3 files changed
+82
-15
No files matched your search
@@ -4,7 +4,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) | Verifies the pinned packages candidate before creating a stable name. 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 verified packages artifact and rc container digests to the stable image tag (also write-once at the image level). |
|
||||
| [`pull-requests-release.yaml`](../../.github/workflows/pull-requests-release.yaml) | Verifies the pinned packages candidate before creating a stable name. 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 verified packages artifact and rc container 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 stable tags. Before staging, verifies green full E2E from the latest rc tag-push run or a tag-correlated manual published-tag run (unless loudly bypassed). Commits and publishes the rewritten packages tree under a run-specific temporary `promotion-*` tag, adds a second commit pinning its digest on the `release-X.Y.Z` branch, generates the changelog there, and opens the promote PR with `release` but no automatic `full-e2e`; the PR gate verifies the candidate and finalize repeats that verification before the stable tag and image retag. The staging branch is force-pushed on re-dispatch, but an existing `docs/changelogs/vX.Y.Z.md` is preserved across the rebuild. |
|
||||
|
||||
|
||||
Reference in new issue
Block a user