-
Bug
-
Resolution: Unresolved
-
Minor
-
jenkins 2.210
When using a parallel block alone in a stages block, the "environment" definition of variables is lost when used in a post block.
This issue can be reproduced using this pipeline:
pipeline { agent any stages { stage("Tests") { environment { foo = "${JOB_NAME}-${BUILD_ID}-${STAGE_NAME}" } parallel { stage("test") { steps { sh 'echo "foo_inside_parallel: ${foo}"' } } } post { always { sh 'echo "foo_inside_post: ${foo}"' } } } } }