|
Using latest pipeline plugin(s) of 2.1. The below code worked once with the iteration. And it stopped (strange) why only once.
node('win-slave4') { checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CleanBeforeCheckout']], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'cca9c557-2-9176-f78d91c22907', url: 'g...@github.com:someProjects/testopy.git']]])
def paths = ['folder1', 'folder2', 'folder3'] def dirs = ['dst1', 'dst2', 'dst3']
[paths, dirs].transpose().each { pd -> def path = pd[0] def dir = pd[1] bat "xcopy %cd% $ {path}
C: $ {dir}
/E /Y /V" } }
|