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:
https://wiki.jenkins-ci.org/display/JENKINS/Terminology


The Groovy script building projectA, should it then set downstream or 
upstream when it wants to build projectB after a successful build?

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/2d8fa4bb-4d2f-4434-9940-396d03fe7a1b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to