Re: Conditional configuration with the Job DSL

2015-10-06 Thread Victor Martinez
Nick, There is also another google group you might find useful: - https://groups.google.com/forum/#!forum/job-dsl-plugin Cheers On Tuesday, 6 October 2015 10:26:44 UTC+2, Nick Stolwijk wrote: > > Doh... that is simpler than I thought. :D I couldn't find any examples in > the various Job DSL

Re: Conditional configuration with the Job DSL

2015-10-06 Thread Nick Stolwijk
Doh... that is simpler than I thought. :D I couldn't find any examples in the various Job DSL configurations I had found. Thanks for the help! Nick Stolwijk ~~~ Try to leave this world a little better than you found it and, when your turn comes to die, you can die happy in feeling that at any ra

Re: Conditional configuration with the Job DSL

2015-10-06 Thread Baptiste Mathus
Well, Job DSL is actually Groovy code. So something like the following should work: scm { if(data.git_url) { git { remote { url(data.git_url) credentials('x-') } createTag(false) } } else if(data.svn-url) { svn(d

Conditional configuration with the Job DSL

2015-10-06 Thread Nick Stolwijk
I'm trying to rebuild my Jenkins jobs through the Job DSL. I have found a lot of documentation and examples, but none about conditional configuration. I have the following job input: projects { componentA { svn-url = 'https://svn.localhost/componenta/trunk/' } componentB { git-url =