Posted By

alces on 02/15/13


Tagged

Jobs Hudson jenkins upstream downstream


Versions (?)

Find cyclic dependencies of hudson maven jobs


 / Published in: Groovy
 

URL: hudson_cyclic_deps

Compares up & down-stream jobs of every hudson jobs for finding dependency-loops

  1. hu = hudson.model.Hudson.instance
  2. gr = hu.dependencyGraph
  3. for (jb in hu.items) {
  4. if (jb instanceof hudson.maven.MavenModuleSet) {
  5. if ((insc = gr.getUpstream(jb).findAll{it in gr.getDownstream(jb)}))
  6. println "For $jb.name $insc.name are in downstream & upstream both"
  7. }
  8. }

Report this snippet  

You need to login to post a comment.