Skip to content

Instantly share code, notes, and snippets.

@slide
Last active May 22, 2021 19:32
Show Gist options
  • Select an option

  • Save slide/06d9f8451c5a0afcef54ff79119a1f88 to your computer and use it in GitHub Desktop.

Select an option

Save slide/06d9f8451c5a0afcef54ff79119a1f88 to your computer and use it in GitHub Desktop.
def call() {
node("local") {
checkout scm
def jenkinsfiles = findFiles glob: "**/Jenkinsfile", excludes: "Jenkinsfile"
builds = [:]
jenkinsfiles.each { it ->
job = load jenkinsfile.path
def jdir = jenkinsfile.path.take(jenkinsfile.path.lastIndexOf("/"))
builds[jdir] = {
stage(jdir) {
node("eks") {
dir(jdir) {
job()
}
}
}
}
}
parallel builds
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment