[image: Capture.JPG]
I'm expecting by selecting the choice parameter it will version of the tool:



On Monday, 18 November 2019 14:47:20 UTC+5:30, Vikrant Kaushik wrote:
>
> In addition to below, I wrote groovy as below for active choice parameter 
> selection in Jenkins job but this is not working, can someone please help.
>
> import groovy.json.JsonSlurper
> try {
> def command = ["curl", "-u", "C1111A:Password", "-X", "POST", "-H", 
> "Content-Type: text/plain", "-k", "
> https://abc.xyz.local/artifactory/api/search/aql";, "-d", 
> "items.find({\"path\":\"$env.tools\"})"].execute().text
> artifact = new JsonSlurper().parseText(command)
> //def jsonList = new JsonSlurper().parseText(command)
> //return["jsonList.results.name"]
> List<String> version = new ArrayList<String>()
> for (i = 0; i <artifact.results.name.size(); i++) 
> {
> version.add("'"+artifact['results'][i]['name']+"'")
> }
> return version
> }
> catch (Exception e) {
> print "Problem fetching the version"
> }
>
> regards
>
>
>
> On Thursday, 14 November 2019 21:47:00 UTC+5:30, Vikrant Kaushik wrote:
>>
>> Hi All,
>>
>> I'm struggling to get the dynamically list of the Artifact Version in 
>> jenkins job parameter, I'm using Jfrog Artifactory as a remote repo.I'm 
>> trying with Active choice parameter but don't know how to get version from 
>> Artifactory.
>>
>> Any help would be appreciated. 
>>
>> regards
>>
>> Vikrant
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/f3a11099-1cb8-47b2-a637-cc1d5bf534d9%40googlegroups.com.

Reply via email to