Nexus Repository 3 - Groovy Script To List Or Delete Assets Based On RegEx

This script allows you to list or delete assets in Nexus Repository 3 matching with a Regular Expression.

Download

Version latest was released August 29, 2017

Download from GitHub

Basic usage

groovy script to list or delete assets based on regular expression

Deploy scripts

provision.sh -h https://repository.host.com -u admin -p ****

Call script

List assets

curl -v -X POST -u admin:****** \
--header "Content-Type: text/plain" \
-d "{\"repoName\": \"raw-static-content\", \"assetName\": \"^prefix/.*\"}" \
https://repository.host.com/service/siesta/rest/v1/script/listAssets/run

Delete assets

curl -v -X POST -u admin:****** \
--header "Content-Type: text/plain" \
-d "{\"repoName\": \"raw-static-content\", \"assetName\": \"^prefix/.*\"}" \
https://repository.host.com/service/siesta/rest/v1/script/deleteAssets/run

Michal Hlaváč

Contact miso@hlavki.eu