Re: Jenkins API with Groovy: setUpstreamProjects

2015-03-09 Thread Sverre Moe
Have not found any code examples of how to set upstream projects. Neither does it seems possible with the Jenkins API. I tried to add directly in config.xml myLib++ myLib2++ But it didn't take. According to both JSON and XML schema both downstreamProject and upstreamProject should be possible.

Re: Jenkins API with Groovy: setUpstreamProjects

2015-02-20 Thread Baptiste Mathus
Upstream means a project is kind of above of some others in the build lifecycle. See it as a waterfall if you like, and water in a waterfall goes down (more rarely up ;-)). You also must think of the required building order: to build your final artifact(s). In your case, you must indeed have built

Jenkins API with Groovy: setUpstreamProjects

2015-02-20 Thread Sverre Moe
I want to dynamically set the downstream projects with a Groovy script. I can get the list of downstream projects, but I cannot find a setter. hudson.model.Hudson.instance.items.each { project -> if (project.name.equals("myProject")) { project.getUpstreamProjects().each { upstreamPro