Skip to content

feat(check_previous_channel_release): swap module_source domain with registry input#75

Open
duckhawk wants to merge 2 commits into
v14from
feat/check-previous-channel-release-swap-domain-v14
Open

feat(check_previous_channel_release): swap module_source domain with registry input#75
duckhawk wants to merge 2 commits into
v14from
feat/check-previous-channel-release-swap-domain-v14

Conversation

@duckhawk
Copy link
Copy Markdown
Member

Summary

  • The previous-channel image often lives on a read-only registry mirror whose domain differs from the registry used to push releases. Today check_previous_channel_release calls crane export "${module_source}/${module_name}/release:${previous_channel}" against the same domain that's baked into module_source, which forces callers to align the two.

  • With this change the action swaps the domain portion of module_source with the registry input before exporting the image:

    read_module_source="${REGISTRY}/${MODULE_SOURCE#*/}"
    crane export "${read_module_source}/${MODULE_NAME}/release:${previous_channel}" -

    So callers can pass vars.PROD_REGISTRY_READ as registry while still keeping module_source built from vars.PROD_REGISTRY (which is what deploy@v14 wants).

  • The registry input description is updated to document the behaviour.

Follow-up to #73.

Test plan

  • Local bash check: MODULE_SOURCE=registry.deckhouse.io/deckhouse/ce/modules; REGISTRY=registry-read.deckhouse.io; echo "\${REGISTRY}/\${MODULE_SOURCE#*/}"registry-read.deckhouse.io/deckhouse/ce/modules.
  • Module-side PRs (csi-ceph, csi-nfs, sds-*, snapshot-controller, state-snapshotter, storage-foundation) start passing registry: \${{ vars.PROD_REGISTRY_READ }} and trigger a non-alpha-channel deploy as a smoke test once this lands on `v14`.

duckhawk added 2 commits May 13, 2026 11:30
Promotes the per-repository check_previous_channel_release.sh script
into a reusable composite action so module repositories don't have to
ship and maintain their own copy.

The version parser now handles both single-line (`{"version":"v0.1.14"}`)
and pretty-printed multi-line `version.json` produced by yq (newlines
and indentation around the keys), using a multiline-aware PCRE grep.
…registry input

The previous-channel image often lives on a read-only mirror that has a
different domain than the registry used to push releases. Swap the
domain portion of `module_source` with the `registry` input before
calling `crane export`, so callers can pass `vars.PROD_REGISTRY_READ`
while keeping `module_source` built from `vars.PROD_REGISTRY`.
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