Is there a Jenkins plugin that can do a group-artifact-version (GAV) search of my Nexus repo and list the results? I would like the results to be available on a parameterized build as a choice (a dropdown).
相关问题
- Jenkins - cmd is not recognized
- Include pom.xml in Jar with gradle
- When using Nokogiri, how do you suppress the inser
- What order does maven find its dependencies?
- proguard causing EnumMap NPE on dynamically declar
I added a groovy script to a Dynamic Choice Parameter (See Jenkins Plugins)
Some hurdles were:
No need for custom Ruby scripts. There is now a dedicated plugin which does what you require: Maven Metadata Plugin for Jenkins CI server
Just mark "Parameterized Build" and "Add Parameter" of type "List Maven artifact versions":
MY_SNAPSHOT_JAR
http://localhost/nexus/service/local/repositories/snapshots/content
Then add a shell command to wget/scp/etc, you can use the following variables resolved by plugin:
Unfortunately you cannot ask about snapshot and release in the same dropdown list. A possible workaround is to add another parameter for MY_RELEASE_JAR (thus another dropdown list, somewhat confusing for a user). Another workaround is to have a separate job for release deployment.