Skip to content

Instantly share code, notes, and snippets.

@martinda
Created October 11, 2019 18:47
Show Gist options
  • Save martinda/fae71b37dc20bcb0e239ab46de3be291 to your computer and use it in GitHub Desktop.
Save martinda/fae71b37dc20bcb0e239ab46de3be291 to your computer and use it in GitHub Desktop.
Jenkinsfile 2.150.x backward compatibility issue
// With Jenkins 2.138.4
def extWorkspace
stage('Allocate Workspace') {
extWorkspace = exwsAllocate 'diskpool1' // Selected Disk ID 'd1' from the Disk Pool ID 'diskpool1'
// The path on Disk is: test-exws/8
}
node() { // Running on Jenkins in /localdisk/martin/jenkins/jenkins/workspace/test-exws
exws(extWorkspace) { // Running in /localdisk/martin/diskpool1/test-exws/8
sh 'pwd' // /localdisk/martin/diskpool1/test-exws/8
stage("Stage") {
sh 'pwd' // /localdisk/martin/diskpool1/test-exws/8 -> this path reverts to
// /localdisk/martin/jenkins/jenkins/workspace/test-exws in Jenkins 2.150.3
}
sh 'pwd' // /localdisk/martin/diskpool1/test-exws/8
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment