-
Improvement
-
Resolution: Won't Fix
-
Minor
-
None
I'm trying to add multiple TFS branches to a MultiScm. Because the Job DSL doesn't support TFS at the moment I'm using the configure block like this:
freeStyleJob('tfs-multi-scm') { configure { it / scm (class: 'org.jenkinsci.plugins.multiplescms.MultiSCM') / scms << 'hudson.plugins.tfs.TeamFoundationServerScm' { serverUrl('http://tfs:8080/tfs/MyProduct') projectPath('$/Branch1') cloakedPaths() localPath('branch1') workspaceName('Jenkins_${COMPUTERNAME}_${JOB_NAME}_Branch1') credentialsConfigurer(class: 'hudson.plugins.tfs.model.AutomaticCredentialsConfigurer') useUpdate('false') } } configure { it / scm (class: 'org.jenkinsci.plugins.multiplescms.MultiSCM') / scms << 'hudson.plugins.tfs.TeamFoundationServerScm' { serverUrl('http://tfs:8080/tfs/MyOtherProduct') projectPath('$/Branch2') cloakedPaths() localPath('branch2') workspaceName('Jenkins_${COMPUTERNAME}_${JOB_NAME}_Branch2') credentialsConfigurer(class: 'hudson.plugins.tfs.model.AutomaticCredentialsConfigurer') useUpdate('false') } } }
All the documentation indicates that '<<' should always add a new node so I would expect there to be two nodes of the 'hudson.plugins.tfs.TeamFoundationServerScm', however the result is only the last node as if I had used '/'. I have tried many other options as described on the configure wiki page. All of them either lead to getting two empty 'hudson.plugins.tfs.TeamFoundationServerScm' nodes (which I can't for the life of me add any sub-nodes to), or one single, filled, node