Skip to content

Instantly share code, notes, and snippets.

@jglick
Forked from michaelneale/parallel workflow
Created September 18, 2015 13:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jglick/96f55e3b8d51a9f588ab to your computer and use it in GitHub Desktop.
Save jglick/96f55e3b8d51a9f588ab to your computer and use it in GitHub Desktop.
#!groovy
stage "preparation"
node {
parallel (
phase1: { sh "echo p1; echo phase1" },
phase2: { sh "echo p2; echo phase2" }
)
sh "echo 42 > data"
stash includes: '*', name: 'binary'
}
stage "do the build"
parallel (
"stream 1": {
node {
unstash "binary"
sh "sleep 20s"
sh "echo hstream1"
}
},
stream2: {
node {
unstash "binary"
sh "echo hello2"
}
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment