Skip to content

Instantly share code, notes, and snippets.

@lavk7
Created August 28, 2020 03:39
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 lavk7/8c48878eb2e3d71c28643d14348c02ba to your computer and use it in GitHub Desktop.
Save lavk7/8c48878eb2e3d71c28643d14348c02ba to your computer and use it in GitHub Desktop.
Parallel stages #jenkins #pipeline
pipeline {
agent none
stages {
stage('Run Tests') {
parallel {
stage('Test On Windows') {
agent {
label "windows"
}
steps {
bat "run-tests.bat"
}
post {
always {
junit "**/TEST-*.xml"
}
}
}
stage('Test On Linux') {
agent {
label "linux"
}
steps {
sh "run-tests.sh"
}
post {
always {
junit "**/TEST-*.xml"
}
}
}
}
}
}
}
stage('run-parallel-branches') {
steps {
parallel(
a: {
echo "This is branch a"
},
b: {
echo "This is branch b"
}
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment