leandrosilvaferreira / cleannexus3releaserepository

Groovy script to clean a release repository in nexus 3

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clean Nexus3 release-repository

Groovy script to clean a release repository in nexus 3

Setup

  • In Nexus 3, go to "Server administration and configuration" -> "Manage scheduled tasks" -> "Create task"
  • Select type "Execute script"
  • Give a Name to task, select "Script language" as "Groovy" and select a "Task frequency" of your choice.
  • Past the script "Cleanup.groovy" in "Script source"
  • Click in "Create Task"

Options

  • retentionDays - Number of days to retain an artifact
  • retentionCount - Number of artifacts to retain independently of retentionDays
  • repositoryName - Repository name

Run

To run, you can click in "Run" button in the top of page.

Logs

To see the logs of execution, in server side, you can:

tail -f /usr/local/sonatype-work/nexus3/log/nexus.log

Info

Tested in a Nexus Repository Manager version OSS 3.1.0-04

License

This script is based in the following :

About

Groovy script to clean a release repository in nexus 3


Languages

Language:Groovy 100.0%