SHARE
TWEET
Untitled
a guest
Feb 28th, 2017
107
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- node {
- jobDsl scriptText: 'job("example-2")'
- jobDsl scriptText: """
- def project = 'Netflix/asgard'
- def branchApi = new URL("https://api.github.com/repos/${project}/branches")
- def branches = new groovy.json.JsonSlurper().parse(branchApi.newReader())
- branches.each {
- def branchName = it.name
- def jobName = "${project}-${branchName}".replaceAll('/','-')
- job(jobName) {
- scm {
- git("https://github.com/${project}.git", branchName)
- }
- }
- }
- """
- }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

