Created
August 28, 2020 03:39
-
-
Save lavk7/8c48878eb2e3d71c28643d14348c02ba to your computer and use it in GitHub Desktop.
Parallel stages #jenkins #pipeline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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