Questions tagged [extended-choice-parameter]

The extended choice parameter Jenkins plugin adds extended functionality to Choice parameter.

The extended choice parameter Jenkins plugin adds extended functionality to Choice parameter.

32 questions
31
votes
6 answers

How can I use the Extended Choice Parameter plugin in a Jenkins pipeline script?

The Extended Choice Parameter plugin is great and I use it in jobs configured via the UI https://wiki.jenkins-ci.org/display/JENKINS/Extended+Choice+Parameter+plugin However, I'm struggling to get it working in a Jenkinsfile style pipeline…
Spangen
  • 4,420
  • 5
  • 37
  • 42
8
votes
1 answer

Running script before all in declarative Jenkinsfile to use Extended Choice Parameter plugin

I'm trying to run a script that instantiates the extended choice parameter variable to use it in the declarative jenkinsfile properties section, but I haven't been able to run a script in the jenkinsfile without a step. I don't want to do it as an…
5
votes
1 answer

Can jenkins extended choice parameter be made dependent on another parameter's value?

I am using extended choice parameter with JSON parameter type in my declarative Jenkins pipeline. I have found it very good for providing custom UI for parameters and it returns a json based on user inputs. I have a use case where what options are…
4
votes
1 answer

Jenkins ExtendedChoicePlugin : Unable to fetch choices from postgres db

I am trying to run below piece of groovy script with ExtendedChoiceParameter plugin but i see an empty list. @GrabConfig(systemClassLoader = true) @Grab(group = 'org.postgresql', module = 'postgresql', version = '9.4-1205-jdbc42') import…
3
votes
2 answers

Use Jenkins WORKSPACE environment variable in Jenkins declarative pipeline parameter

Is there a way to use Jenkins WORKSPACE environment variable in Jenkins declarative pipeline parameters? Below attempt failed. pipeline { parameters { extendedChoice description: 'Template in project', …
2
votes
1 answer

Get all folders in a given directory with Groovy script (using Extended choice parameter in Jenkins)

Im using Extended Choice Parameter in Jenkins. I want to add a drop down parameter in the job and display all folder names within the given directory using a groovy script how can i do that ?
2
votes
1 answer

Accessing environment variables in Extended Choice Parameter

I want to write a Groovy script for Extended Choice Parameter that would use access WORKSPACE variable. When I try: List artifacts = new ArrayList() artifacts.add(env.WORKSPACE) asdf = env.WORKSPACE println asdf return artifacts I…
zorglub76
  • 4,852
  • 7
  • 37
  • 46
2
votes
1 answer

How to get Jenkins environment variables in Extended Choice Parameter plugin

I have to define a single select combo box where a list of available values is defined in a Jenkins environment variable (Manage Jenkins → Configure System → Global properties → Environment variables). How could I achieve that? I tried to use build…
agabrys
  • 8,728
  • 3
  • 35
  • 73
2
votes
2 answers

Parameterized Jenkins Pipeline: Choices not showing up

I am trying to setup my pipeline as a Parameterized Pipeline using Single_select choice parameters. My pipeline header looks as follows: properties( [ parameters([ [ $class: 'ChoiceParameter', …
Ceesiebird
  • 696
  • 2
  • 11
  • 24
1
vote
0 answers

How to define with credentials in groovy script in extended choice parameters

i need to withcredntails i am storing my AWS keys in Jenkins credentials def command = 'aws acm list-certificates --query "CertificateSummaryList[?DomainName=='*.osdemo.cf'].CertificateArn" --output text' def proc = command.execute() proc.waitFor() …
1
vote
1 answer

how to configure jenkins extendedChoice parameter to print value from map but see key in selection dropdown

I am having a somewhat difficult time figuring out how to make a simple Jenkins pipeline to print values from a simple map. I use extendedChoice plugin. The requirement is the following: The user has a dropdown selection of names, once selected a…
1
vote
0 answers

Jenkins: Build with Parameters button keeps disappearing

... pipeline.aws(configMap) { properties([ parameters([ extendedChoice(name: 'built_version', type: 'PT_SINGLE_SELECT', description: 'qa built version to deploy', visibleItemCount: 10, groovyScript: …
1
vote
1 answer

Jenkins: How to use 'bindings' field of Extended Choice Parameters plugin?

I don't understand how to use the 'bindings' field of extendedChoice parameter, I checked the source code of the plugin and see that it adds variables in a context in the groovyShell, but I don't understand how to access this context. I try to set…
1
vote
0 answers

How to use Extended Choice Parameter plugin with checkbox?

I am using extended choice parameter plugin. I have to run specific/all components using checkbox or any other method. Here I was able to build specific component, but its failing when I build two or more components. here is the configuration that I…
1
vote
1 answer

How to specify path to groovy script file

I currently have my groovy script in workspace under sdkTools/tools/at-jenkins/helloWorld.groovy I dont know in what form this file path needs to be I have…
1
2 3