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 { upstreamProject ->
println("Upstream Project: " + upstreamProject.name)
}
}
}
Is it possible to set this value from a Groovy script?
When I create the Post-build Action "Build other projects" and add projectB for projectA. Then projectB will list projectA as a upstream project (should it not be downstream?). This I find confusing because projectA is a library used by projectB. So actually then projectB is a upstream project of projectA.
projectA should list projectB as upstream project, and projectB should list projectA as downstream project.
Or perhaps I am getting the meaning of downstream/upstream wrong:
The Groovy script building projectA, should it then set downstream or upstream when it wants to build projectB after a successful build?