Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static def makeScmEditable(scm, env) {
- Integer i
- def branches = []
- for (i = 0; i < scm.branches.size(); i++) {
- def it = scm.branches.get(i)
- branches.add([name: it.getName()])
- }
- def userRemoteConfigs = []
- for (i = 0; i < scm.userRemoteConfigs.size(); i++) {
- def it = scm.userRemoteConfigs.get(i)
- userRemoteConfigs.add([
- name: it.getName(),
- url: it.getUrl(),
- credentialsId: it.getCredentialsId(),
- refspec: it.getRefspec()
- ])
- }
- return [ $class: 'GitSCM', extensions: [], branches: branches, userRemoteConfigs: userRemoteConfigs ]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement