Skip to content

pulp-cleanup: add nightly Jenkins job for stale Pulp resource cleanup - #2644

Open
vamahaja wants to merge 1 commit into
mainfrom
pulp-cleanup
Open

pulp-cleanup: add nightly Jenkins job for stale Pulp resource cleanup#2644
vamahaja wants to merge 1 commit into
mainfrom
pulp-cleanup

Conversation

@vamahaja

@vamahaja vamahaja commented Jul 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Add a nightly pulp-cleanup-nightly Jenkins job that purges stale ceph project Pulp repositories and distributions using scripts/purge-policy.yaml.
  • Cleanup excludes named policy refs via label-select, deletes remaining resources past the default retention days (distributions before repositories), then runs orphan cleanup.
  • Update pulp_upload.sh so repository version retention uses per BRANCH & keep_minimum from the purge policy, with fallback to the default.

Job config

  • Job: pulp-cleanup-nightly, triggered @midnight.
  • Parameters: CEPH_BUILD_BRANCH (default main), CEPH bool (default true) to enable ceph project cleanup.
  • Pipeline sets up the Pulp client, then runs cleanup.sh when CEPH is true.

Purge policy (scripts/purge-policy.yaml)

  • Project root: ceph
  • Default retention: days: 14, keep_minimum: 3
  • Per-ref overrides for release and special branches
  • Cleanup uses named refs as exclusions; uploads use keep_minimum for repository version retention

@vamahaja
vamahaja marked this pull request as draft July 8, 2026 07:31
@vamahaja
vamahaja force-pushed the pulp-cleanup branch 5 times, most recently from f47e5f6 to 72d89d9 Compare July 8, 2026 09:39
@vamahaja
vamahaja marked this pull request as ready for review July 8, 2026 13:03
@vamahaja
vamahaja requested review from djgalloway and zmc July 8, 2026 13:03
@vamahaja
vamahaja marked this pull request as draft July 8, 2026 13:06
@djgalloway

Copy link
Copy Markdown
Contributor

I think we need something more like chacra's retention map.

Or at least leave this PR as-is but add KEEP_MINIMUM or RETAIN_MINIMUM on top of RETAIN_DAYS.

@vamahaja

Copy link
Copy Markdown
Member Author

I think we need something more like chacra's retention map.

Or at least leave this PR as-is but add KEEP_MINIMUM or RETAIN_MINIMUM on top of RETAIN_DAYS.

Updated logic PTAL.

@vamahaja
vamahaja force-pushed the pulp-cleanup branch 6 times, most recently from c62087e to 9d67a99 Compare July 14, 2026 11:24
@vamahaja
vamahaja force-pushed the pulp-cleanup branch 3 times, most recently from a0b55c6 to a83e10c Compare July 20, 2026 10:49
Add a nightly Jenkins job and cleanup script that prune stale `Ceph` project
Pulp repositories and distributions using `scripts/purge-policy.yaml`.

Also update `pulp_upload.sh` so repository version retention uses
`keep_minimum` from the purge policy for the current `BRANCH`, falling back
to the default when the ref is not listed.

Signed-off-by: Vaibhav Mahajan <vamahaja@redhat.com>
@vamahaja
vamahaja marked this pull request as ready for review July 20, 2026 11:22
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