-
Improvement
-
Resolution: Duplicate
-
Minor
-
None
If I want to run five different test suites, each having their own test result patterns, on five different nodes, in parallel, how do I do that?
The abbreviated pipeline below all seems to work except for the collecting test results part, since when tests fail, the junit instruction is ignored (I guess since the previous step had a non-zero exit code).
When not using the new declarative pipeline format, I could potentially use try/catch/finally and shove the junit instruction in the finally block as seen here.
Current attempt:
pipeline { agent label:'master' environment { GIT_COMMITTER_NAME = "jenkins" GIT_COMMITTER_EMAIL = "jenkins@jenkins.io" } stages { stage("Build") { steps { parallel ( "sweet" : { node("has-docker") { git 'ssh://git@stash.example.com/automation/sweet.git' sh 'APP_NAME=sweet \ TEST_ENV=qa5 \ bin/ci' junit '**/test-reports/*.xml' } }, "word" : { node("has-docker") { git 'ssh://git@stash.example.com/automation/word.git' sh 'APP_NAME=word \ TEST_ENV=qa5 \ bin/ci' junit '**/nosetests.xml' } } ) } } } post { always { deleteDir() } } }
So in summary, the existing docs on parallel execution are pretty good, but they don't describe how to collect test results from parallel executions on different nodes.
- duplicates
-
JENKINS-41334 Support parallel execution of stages in Declarative
- Closed