Multibranch Project Parameterized Drop-down?

18 vaatamist
Liigu esimese lugemata sõnumi juurde

pisymbol

lugemata,
8. veebr 2018, 15:02:1608.02.18
kuni Jenkins Users
How do I add build parameters to a multibranch project that is a drop down menu?

I can't find an example anyway and I know there has to be a way to do this! :-)

I was hoping some kind soul can give a DSL and/or Groovy script syntax example.

Thanks!

-aps

pisymbol

lugemata,
8. veebr 2018, 17:42:1308.02.18
kuni Jenkins Users
Well, I found the Groovy script to do it:

properties([[$class: 'ParametersDefinitionProperty', parameterDefinitions:
    [[$class: 'ChoiceParameterDefinition', choices: 'centos\nredhat\nmylittlepony\nheman', description: 'Please choose a platform', name: 'PLATFORM'],
    [$class: 'StringParameterDefinition', description: 'Custom configure options', name: 'CONFIGURE_OPTS']]]])

etc.

Is there a simple DSL statement that encapsulates the above? Man, the Jenkins doc is "challenging" to say the least.

-aps

Victor Martinez

lugemata,
9. veebr 2018, 08:53:1609.02.18
kuni Jenkins Users
Although I'm not aware of any dsl for that parameters, but the below URL might help you to convert UI configuration to pipelines easily:


Cheers

pisymbol .

lugemata,
9. veebr 2018, 09:23:2909.02.18
kuni jenkins...@googlegroups.com
On Fri, Feb 9, 2018 at 8:53 AM, Victor Martinez <victormar...@gmail.com> wrote:
Although I'm not aware of any dsl for that parameters, but the below URL might help you to convert UI configuration to pipelines easily:



Thank you! I do try the Snippet Generator all the time though. The problem is the generator is very incomplete, e.g. "parameters" etc.

-aps 
Vasta kõigile
Vasta autorile
Saada edasi
0 uut sõnumit