Skip to content

Instantly share code, notes, and snippets.

@macg33zr
Created July 11, 2013 00:22
Show Gist options
  • Save macg33zr/5971446 to your computer and use it in GitHub Desktop.
Save macg33zr/5971446 to your computer and use it in GitHub Desktop.
Jenkins System Groovy Script - Enumerate Upstream Projects. If the project is triggered by other projects and you need to enumerate them, this is how I found out to do it in a System Groovy build step
def upStreamProjects = build.getParent().getUpstreamProjects()
println "Found ${upStreamProjects.size()} upstream projects"
upStreamProjects.each { p -> println "upstream project: ${p.getName()}" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment