Re: Dynamically list Artifact Version in jenkins job parameter

2019-11-18 Thread Vikrant Kaushik


[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", "CA: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 version = new ArrayList()
> for (i = 0; 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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/f3a11099-1cb8-47b2-a637-cc1d5bf534d9%40googlegroups.com.


Re: Dynamically list Artifact Version in jenkins job parameter

2019-11-18 Thread Vikrant Kaushik
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", "CA: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 version = new ArrayList()
for (i = 0; i 
> 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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/fd07fcf3-bb6f-4319-affb-c67c3c0a095f%40googlegroups.com.


Dynamically list Artifact Version in jenkins job parameter

2019-11-14 Thread Vikrant Kaushik
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/6d68bfac-73fa-4739-83f4-955c0f73824d%40googlegroups.com.