Skip to content

Instantly share code, notes, and snippets.

@abayer
Created February 27, 2017 22:36
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 abayer/bbe18e779696af88af9208f7502b898c to your computer and use it in GitHub Desktop.
Save abayer/bbe18e779696af88af9208f7502b898c to your computer and use it in GitHub Desktop.
// right now:
stage('foo') {
steps {
parallel(a: { echo "First branch" },
b: { echo "Second branch })
}
}
// Translates roughly to:
// stage('foo') contains parallel
// parallel contains branches a and b
// branch a contains echo
// branch b contains echo
// proposed
stage('foo') {
parallel {
stage('a') {
steps {
echo "First branch"
}
}
stage('b') {
steps {
echo "Second branch"
}
}
}
}
// Translates roughly to:
// stage('foo') contains parallel
// parallel contains branches: a and b
// branch a contains stage('a')
// stage('a') contains echo
// branch b contains stage('b')
// stage('b') contains echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment