-
New Feature
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins 2.19.3
Pipeline 2.4
It would be great if I had the ability to define a default workspace location for all nodes inside my pipeline.
Example:
I want to specify a default workspace for all nodes inside my pipeline. If I want to do this, I need to wrap the same kind of snippet for each node. For example:
node ('A') { dir("${env.BUILD_NUMBER}") { withEnv(["WORKSPACE=${env.WORKSPACE}/${env.BUILD_NUMBER}"]) { // ... } } } node ('B') { dir("${env.BUILD_NUMBER}") { withEnv(["WORKSPACE=${env.WORKSPACE}/${env.BUILD_NUMBER}"]) { // ... } } } node ('C') { dir("${env.BUILD_NUMBER}") { withEnv(["WORKSPACE=${env.WORKSPACE}/${env.BUILD_NUMBER}"]) { // ... } } } [...]
This is redundant. The same applies to the `ws` step.
- links to