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

Visit my.sonatype.com for documentation on Nexus Repository version 2.

You may want to programatically determine via Nexus Repository 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 .

Have more questions? Submit a request

0 Comments

Article is closed for comments.