Details
-
Improvement
-
Status: Fixed but Unreleased (View Workflow)
-
Major
-
Resolution: Duplicate
-
None
Description
In order to support a number of use cases, we need a way to define variables that can be accessed across different steps blocks.
As a talking point, here's what someone was trying to do:
pipeline { agent { node label: 'master' } stages { stage('Allocate workspace') { steps { script { def extWorkspace = exwsAllocate 'diskpool1' } } } stage('Build') { steps { parallel( "a": { node(label: 'a') { exws (extWorkspace) { sh 'ls -la' } } }, "b": { node(label: 'b') { exws (extWorkspace) { sh 'ls -la' } } } ) } } } }
Attachments
Issue Links
- duplicates
-
JENKINS-44376 Ability to set variables shared between stages
-
- Open
-
Activity
Field | Original Value | New Value |
---|---|---|
Epic Link | JENKINS-36291 [ 172300 ] |
Assignee | James Dumay [ jamesdumay ] |
Assignee | Keith Zantow [ kzantow ] |
Epic Link | JENKINS-36291 [ 172300 ] |
|
Link | This issue duplicates JENKINS-44376 [ JENKINS-44376 ] |
Resolution | Duplicate [ 3 ] | |
Status | Open [ 1 ] | Fixed but Unreleased [ 10203 ] |
kzantow That would work if you define extWorkspace as an environment variable instead of a groovy variable.