Staging: How to find where a staging repository is promoted to using REST

You may want to programatically determine via Nexus REST API the build promotion repository id that a staging repository has been promoted too.

There is a REST call which can be used to extract the promotion repository id

curl -u admin:admin123 http://localhost:8081/nexus/service/local/staging/repository/<stagingRepositoryId>

If the repository was promoted and has completed it's transitioning, the response will contain a <parentGroupId> element containing the build promotion repo id.

Note: The nexus-staging-maven-plugin version 1.4.5 and greater will now print the promotion repository id on stdout when a repository is promoted using nexus-staging:promote . See for more information.

Have more questions? Submit a request


Article is closed for comments.