logo
down
shadow

Jenkins "Choice Parameter" - is there any way to define text and value using separator?


Jenkins "Choice Parameter" - is there any way to define text and value using separator?

By : gong
Date : November 19 2020, 12:41 AM
seems to work fine There is a feature request outstanding for this https://issues.jenkins-ci.org/plugins/servlet/mobile#issue/JENKINS-22317
code :


Share : facebook icon twitter icon
jenkins: pass multiple "Extended Choice Parameter" values using a URL

jenkins: pass multiple "Extended Choice Parameter" values using a URL


By : David Bezoenik
Date : March 29 2020, 07:55 AM
wish of those help One of the parameters in my Jenkins build is an Extended Choice Parameter which is submitted as a selection of comma separated values when invoking the build from the build webpage. , Including the URL in single quotes work:
code :
wget '${JENKINS_URL}/job/buildname/buildWithParameters?ECP_LIST=blah3&token=token'
curl -X POST 'http://api:xxxxxxxxxxxxxxxxxxxxxxx@jenkins.YOURSERVER.com/job/BUILDNAME/buildWithParameters?parameter2=blah&parameter2=blahblah'
Jenkins - "Text Finder Plugin" responding "file is empty "

Jenkins - "Text Finder Plugin" responding "file is empty "


By : ramix
Date : March 29 2020, 07:55 AM
this one helps. I'd like to provide the way we sorted out this issue, so that it can be useful for someone indeed. Follow the below steps:
1.Print the contents of the file from the jenkins job(just "Cat filename" will work), so the content will be printed on the jenkins console output
Accessing Jenkins job parameter variable in Extensible Choice using System Groovy Choice Parameter

Accessing Jenkins job parameter variable in Extensible Choice using System Groovy Choice Parameter


By : Ryan Nguyen
Date : March 29 2020, 07:55 AM
To fix the issue you can do You are trying to use this plugin in wrong way. Look at this question and its answer
How to define a Jenkins String parameter based on the Choice parameter selected

How to define a Jenkins String parameter based on the Choice parameter selected


By : Shankar Sutar
Date : March 29 2020, 07:55 AM
With these it helps This is not possible in Jenkins build with parameters page. Parameters are loaded all at once, and cannot have logic that depends on the value of another one.
You have a few options, some easy ones are:
Jenkins pipeline conditional stage using "When" for choice parameters

Jenkins pipeline conditional stage using "When" for choice parameters


By : ebuychance
Date : March 29 2020, 07:55 AM
Any of those help Your when expression has an error. If your parameter's name value is 'a', you are comparing strings 'a' == 'a|d|f' in your code, which is false.
You probably want to do
code :
when {
    expression { 
        params.name == 'a' ||
        params.name == 'd' ||
        params.name == 'f' 
    }
}
when {
    expression { 
        params.name ==~ /a|d|f/
    }
}
shadow
Privacy Policy - Terms - Contact Us © ourworld-yourmove.org