Created
October 25, 2016 07:27
-
-
Save aheuermann/f451a5b8875efabcab970ea1415a3852 to your computer and use it in GitHub Desktop.
Jenkins Pipeline Parallel Test Example
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
node { | |
stage('Preparation') { // for display purposes | |
// Get some code from a GitHub repository | |
git 'https://github.com/dotci-test/test1.git' | |
} | |
stage('Build') { | |
// Run the build | |
if (isUnix()) { | |
sh "'docker-compose' build --pull" | |
} else { | |
echo "unix only" | |
} | |
} | |
stage('Test') { | |
def steps = [:] | |
steps["golang"] = { | |
sh "'docker-compose' run -T golang sh -xc \"go version\"" | |
} | |
steps["node"] = { | |
sh "'docker-compose' run -T node sh -xc \"node -v\"" | |
} | |
steps["node2"] = { | |
sh "'docker-compose' run -T node2 sh -xc \"echo test2\"" | |
} | |
parallel steps | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Extracting junit results
https://github.com/jenkinsci/blueocean-plugin/blob/6de837223b80cca1390f4765a8d561aab5e007de/Jenkinsfile#L17
https://ci.blueocean.io/blue/organizations/jenkins/blueocean/detail/topic%2Ffeature-flipper/7/tests