xt4k

Untitled

Nov 17th, 2021
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. def project = 'Netflix/asgard'
  2. def branchApi = new URL("https://api.github.com/repos/${project}/branches")
  3. def branches = new groovy.json.JsonSlurper().parse(branchApi.newReader())
  4. branches.each {
  5. parallel{
  6. def branchName = it.name
  7. def jobName = "${project}-${branchName}".replaceAll('/','-')
  8. job(jobName) {
  9. scm {
  10. git("https://github.com/${project}.git", branchName)
  11. }
  12. }
  13. }
  14. }
  15.  
Advertisement
Add Comment
Please, Sign In to add comment