Is there a way I can using Dynamic parameter in Jenkins to populate a dropdown of artifact versions using their REST API? It needs to be in Groovy so I can make use of the Dynamic Choice Parameter Plugin.
1 Answers
0
votes
The Artifactory version search REST API method can be used to get a list of all available artifact versions by GroupId and ArtifactId in local, remote or virtual repositories.
For example:
GET /api/search/versions?g=org.acme&a=artifact&repos=libs-release-local
{
"results": [
{
"version": "1.2",
"integration": false
},{
"version": "1.0-SNAPSHOT",
"integration": true
},{
"version": "1.0",
"integration": false
}
]
}