Re: Jenkins job dsl- any way to dry run before affecting changes?

2019-12-30 Thread David Karr
It seems to me that the only reasonable way to "integration test" pipeline changes before deployment is simply to deploy the changes to a job that is not used for regular work, one that you can manually send events to, to make sure it does what it needs to do. This is sort of like a "canary deploy

Re: Jenkins job dsl- any way to dry run before affecting changes?

2019-12-30 Thread red 888
Hey, thanks for the suggestions! I know about the testing framework and while I may wind up using it out of necessity I think dry-run is more valuable than a unit test here. Let me ask you this, could I have a unit test that I could run locally but that that jenkins could also run first before

Re: Modify agent using a declarative pipeline shared library

2019-12-30 Thread Mario Jauvin
Would there be a way to create a groovy variable named agentObject that either contains the object {label "$agentLabel"} or the object any provided by the pipeline namespace and use a syntax like: agent $agentObject? On Monday, December 30, 2019 at 8:53:12 AM UTC-5, Mario Jauvin wrote: > > This

Re: Modify agent using a declarative pipeline shared library

2019-12-30 Thread Mario Jauvin
> > This seems to be the only way that I can get it working but it requires >> repeating the pipeline twice which in my case is a complicated one: >> > def call(String buildType, String agentLabel=null) { if ("versionBranch".equals(buildType)) { if (agentLabel==null) { pipeline { agent

Re: Jenkins job dsl- any way to dry run before affecting changes?

2019-12-30 Thread Victor Martinez
I've just seen your comment in the open PR regarding https://issues.jenkins-ci.org/browse/JENKINS-27182 > What I want is for my seed job to first output what it's going to change and wait for user input, then if the user confirms make the changes IIUC, you would like to mimic a kind of code revi