Skip to content

Instantly share code, notes, and snippets.

@solvingj
Created May 7, 2020 20:54
Show Gist options
  • Save solvingj/f784f7559396e2287222f3deebd21a69 to your computer and use it in GitHub Desktop.
Save solvingj/f784f7559396e2287222f3deebd21a69 to your computer and use it in GitHub Desktop.
Jenkins CASC
jobs:
- script: >
multibranchPipelineJob('libA') {
branchSources {
git {
id = 'libA'
credentialsId = 'GIT_CREDS'
remote('http://172.17.0.3:8080/git/root/libA.git')
}
}
}
multibranchPipelineJob('libB') {
branchSources {
git {
id = 'libB'
credentialsId = 'GIT_CREDS'
remote('http://172.17.0.3:8080/git/root/libB.git')
}
}
}
multibranchPipelineJob('libC') {
branchSources {
git {
id = 'libC'
credentialsId = 'GIT_CREDS'
remote('http://172.17.0.3:8080/git/root/libC.git')
}
}
}
multibranchPipelineJob('App') {
branchSources {
git {
id = 'App'
credentialsId = 'GIT_CREDS'
remote('http://172.17.0.3:8080/git/root/App.git')
}
}
}
multibranchPipelineJob('App2') {
branchSources {
git {
id = 'App'
credentialsId = 'GIT_CREDS'
remote('http://172.17.0.3:8080/git/root/App2.git')
}
}
}
@solvingj
Copy link
Author

solvingj commented May 7, 2020

Working Block:

jobs:
  - script: >
      multibranchPipelineJob('libA') {
          branchSources {
              git {
                  id = 'libA'
                  credentialsId = 'GIT_CREDS'
                  remote('http://172.17.0.3:8080/git/root/libA.git')
              }
          }
      }
  - script: >
      multibranchPipelineJob('libB') {
          branchSources {
              git {
                  id = 'libB'
                  credentialsId = 'GIT_CREDS'
                  remote('http://172.17.0.3:8080/git/root/libB.git')
              }
          }
      }
  - script: >
      multibranchPipelineJob('libC') {
          branchSources {
              git {
                  id = 'libC'
                  credentialsId = 'GIT_CREDS'
                  remote('http://172.17.0.3:8080/git/root/libC.git')
              }
          }
      }
  - script: >
      multibranchPipelineJob('App') {
          branchSources {
              git {
                  id = 'App'
                  credentialsId = 'GIT_CREDS'
                  remote('http://172.17.0.3:8080/git/root/App.git')
              }
          }
      }
  - script: >
      multibranchPipelineJob('App2') {
          branchSources {
              git {
                  id = 'App'
                  credentialsId = 'GIT_CREDS'
                  remote('http://172.17.0.3:8080/git/root/App2.git')
              }
          }
      }
      

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment