Skip to content

chore(ci): clean up custom release tags in dev registry#2461

Open
universal-itengineer wants to merge 3 commits into
mainfrom
chore/ci/improve-cleanup-dev-registry
Open

chore(ci): clean up custom release tags in dev registry#2461
universal-itengineer wants to merge 3 commits into
mainfrom
chore/ci/improve-cleanup-dev-registry

Conversation

@universal-itengineer

@universal-itengineer universal-itengineer commented Jun 9, 2026

Copy link
Copy Markdown
Member

Description

Add a dedicated cleanup script for custom module release tags in the development registry.

The dev registry cleanup workflow now:

  • checks out full Git history and tags before running werf cleanup;
  • keeps the existing werf cleanup for werf-managed images;
  • runs .github/scripts/bash/registry-module-cleanup.sh to clean custom tags in ${MODULES_MODULE_SOURCE}/${MODULES_MODULE_NAME}/release;
  • supports a dry_run input for manual workflow runs.

The script removes expired pr*, release-*, and v*-rc.* tags based on configurable TTL values while leaving stable release tags, release channel tags, and main untouched.

Why do we need it, and what problem does it solve?

werf cleanup policies are based on Git history and apply to werf-managed image versions. The module release tags published to the /release repository are created separately via crane copy, so tags such as pr1234 and old release candidates were not removed by the existing cleanup job.

This change adds cleanup for those custom registry tags and prevents the development registry from accumulating obsolete module release images.

What is the expected result?

  1. Run the Cleanup dev registries workflow manually with dry_run=true.
  2. Verify that the custom cleanup step reports expired /release tags that would be deleted.
  3. Run the workflow with dry_run=false or wait for the scheduled run.
  4. Verify that expired pr*, release-*, and old v*-rc.* tags are removed from the dev registry while stable releases and channel tags remain available.

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Changelog entries

section: ci
type: chore
summary: Clean up obsolete custom release tags in the development registry.
impact_level: low

werf cleanup keep policies only apply to werf-managed images, so the
pr*, release-*, and v*-rc.* tags published to the /release repository via
crane copy were never removed. Add a dedicated crane-based cleanup script
for the /release repository and wire it into the dev registry cleanup
workflow with a dry-run input and full git history checkout.

Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
@universal-itengineer universal-itengineer added this to the v1.10.0 milestone Jun 9, 2026
@universal-itengineer universal-itengineer marked this pull request as ready for review June 9, 2026 12:36
Comment thread .github/scripts/bash/registry-module-cleanup.sh
Comment thread .github/workflows/dev_registry-cleanup.yml Outdated
Comment thread .github/scripts/bash/registry-module-cleanup.sh Outdated
Signed-off-by: Nikita Korolev <nikita.korolev@flant.com>
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.

2 participants