Add time-based cleanup for Maven snapshot versions #33420
+233
−8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request: Implement Cleanup Function for Maven Snapshot Versions
Overview
This pull request introduces a cleanup function for Maven snapshot versions in Gitea, enabling more efficient management of package storage. The new feature allows users to specify how many of the most recent Maven snapshot builds to retain, optimizing storage by automatically removing older files.
Features
RETAIN_MAVEN_SNAPSHOT_BUILDS
allows setting the number of Maven snapshot builds to keep.-1
, which keeps all builds.Implementation
The feature extends the existing cleanup job to include files from Maven snapshot versions based on the specified retention policy set in
app.ini
. It checks against the highest build number from the Maven metadata file to determine which files to retain.Impact
This enhancement helps manage disk space more effectively by providing control over how many builds of Maven snapshots are retained, potentially reducing storage requirements for projects using Maven within Gitea.