I would like to update the DependencyGraph in Jenkins.
Some part of the code:
def pl = z.getPublishersList()
for(w in pl){
def bt = w.grep(hudson.tasks.BuildTrigger.class)
println(bt )
for(aa in bt){
println("BT " + aa.getChildProjectsValue())
pl.add( new hudson.tasks.BuildTrigger("TestTop2", false))
}
}
I try to use
def newtop = hi.getItem("TestTop2")
def graph3 = Hudson.getInstance().getDependencyGraph()
newtop.buildDependencyGraph(graph2)
But that doesn’t work. Whats the correct way to rebuild the DependencyGraph ?
This will rebuild the DependencyGraph from the script console