sonatype-nexus-community / nexus-repository-apt

A Nexus Repository 3 plugin that allows usage of apt repositories

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: Cleanup Task

exabrial opened this issue · comments

So fi you're using CI, you'll like build a ton of pre-release packages. It would be awesome if there was a feature to clean these up.

Maven2 repositories have a task you can schedule to delete snapshots on a regular basis.

commented

I've only been using this specific plugin for a few days, but I think I've gotten around this by having my CI call a shell script during the upload process to also run the following

curl -I -u user:pass -X DELETE http://nexus:8081/repository/repo/snapshots/release123
curl -I -u user:pass -X MKCOL http://nexus:8081/repository/repo/snapshots/release123

So we solved this by naming our apt packages properly. If you name your snapshot releases aka pre-releases in the apt world properly, the setting "asset history limit" will only keep that number of pre-release packages around.

Pretty cool feature, already built in! Just remember to setup a task to compact your blob store if you haven't already.