sonatype-nexus-community / nexus-repository-composer

Composer support for the Nexus Repository Manager (work in progress!)
Eclipse Public License 1.0
214 stars 81 forks source link

Implement cleanup policy #99

Closed ThYpHo0n closed 1 year ago

ThYpHo0n commented 2 years ago

This PR addresses https://github.com/sonatype-nexus-community/nexus-repository-composer/issues/63 and implements the needed changes to assign cleanup policies to Composer repositories. This greatly helps to maintain your Nexus instance to not waste disk space for old/unused artifacts.

I used the referenced PR from the issue pointing to the Conan repo plugin and how they implemented there.

image

It relates to the following issue #s:

I tested it successfully on our own Nexus instance and it cleaned up the artifact as expected.

sonatypecla[bot] commented 2 years ago

Thanks for the contribution! Before we can merge this, we need @ThYpHo0n to sign the Sonatype Contributor License Agreement.

ThYpHo0n commented 2 years ago

@bhamail any ETA/feedback for this PR to be merged?

ThYpHo0n commented 1 year ago

Changes after the merge still look good to me 👍🏻

githoober commented 1 year ago

The cleanup task does not find any composer components to remove. I set the cleanup policy for components with no downloads in 1 day, or in 30 days, and the search in repositories does not find any.

image

I am using Nexus 3.47 and Composer plugin 0.0.29 released on Nov 7, 2022. Can anyone confirm the composer cleanup works for you properly?