groovy - Jenkins Pipeline - how to get values after parallel execution -


is possible save values during parallel execution , use these values during final step?

in following example, know jenkins slave used during parallel execution , use during final step.

node {     stage 'checkout'     checkout([...])     stash includes: '**', name: 'binary'      stage 'running simulation'     parallel (         "stream 1" : {                           node {                                 unstash "binary"                                 sh "echo \"\$(whoami)@\$(hostname):\$pwd\""                                 // how save previous result                                  // run simulation on node first slave                                 ...                            }                         },         "stream 2" : {                           node {                                              unstash "binary"                                 sh "echo \"\$(whoami)@\$(hostname):\$pwd\""                                 // how save previous result                                  // run simulation on node second slave                                 ...                            }                         }               )       stage 'gathering results files'     // use values of slaves retrieve files.      stage 'generate report'  } 

thanks answer.

my bad, using 2.3 version of pipeline nodes , processes plugin. works fine version 2.5

hostname = sh (returnstdout: true, script: 'hostname') println hostname 

Comments

Popular posts from this blog

qt - QML MouseArea onWheel event not working properly when inside QML Scrollview -

java - is not an enclosing class / new Intent Cannot Resolve Constructor -

python - Error importing VideoFileClip from moviepy : AttributeError: 'PermissionError' object has no attribute 'message' -