Re: Parameterized build driven by Jenkinsfile

2017-08-10 Thread Craig Barr
Thanks Jacob. That worked exactly as I would expect! On Thu, Aug 10, 2017 at 5:40 AM, Jacob Larsen wrote: > Try this: > properties([ > parameters([ > string(name: 'bld', defaultValue: 'full', description: ''), > string(name: 'branch', defaultValue: 'dev',

Re: Parameterized build driven by Jenkinsfile

2017-08-09 Thread R. Tyler Croy
(replies inline) On Wed, 02 Aug 2017, Craig Barr wrote: > In Jenkins you can select "This project is parameterized" and add > parameters. My question is simple: > Can this parameter metadata be populated by an alternative > version-controlled source? > > For example, can I define parameter

Re: Parameterized build driven by Jenkinsfile

2017-08-09 Thread Jacob Larsen
Try this: properties([ parameters([ string(name: 'bld', defaultValue: 'full', description: ''), string(name: 'branch', defaultValue: 'dev', description: '') ]) ]) /Jacob On 2017-08-09 03:54, Craig Barr wrote: Thanks Jacob and Alex! Which version of Jenkins does this work for you on?

Re: Parameterized build driven by Jenkinsfile

2017-08-03 Thread Alex Marcon
That's right... to define, it is something like: parameters { string(name: 'bld', defaultValue: 'full', description: '') string(name: 'branch', defaultValue: 'dev', description: '') } you may load some properties from a file and use those variables for defaultValue...

Re: Parameterized build driven by Jenkinsfile

2017-08-03 Thread Jacob Larsen
Yes, kind of... The parameters are hidden in the "properties" structure. They will be applied to the job when it runs, meaning that the first run will not have these parameters defined. If you make your Jenkinsfile robust for undefined parameters, it should be doable, just remember that they

Parameterized build driven by Jenkinsfile

2017-08-02 Thread Craig Barr
In Jenkins you can select "This project is parameterized" and add parameters. My question is simple: Can this parameter metadata be populated by an alternative version-controlled source? For example, can I define parameter definitions in my Jenkinsfile so that when I click Build Now it will