I understand this post is similar to: Aggregating results of downstream is no test in Jenkins
and also to: Aggregating results of downstream parameterised jobs in Jenkins
Nonetheless, I am not able to figure out for my case, how to make this working. I am currently using Jenkins 1.655.
I have jobs A, B, C - A being the upstream job. What I want to do is to have A call B and B call C. All needs to block and wait for completion of the next. If one fails, all fails. B and C generate unit test reports. So I want to aggregate these reports in A and then Publish that result in A. So, here's the current setup of the jobs:
Job A:
Build Steps
- Execute shell:
echo $(date) > aggregate - Trigger Parametrized Buid Job: Job B
Post Build Steps
- Aggregate downstream test results
- Record fingerprints of files to track usage: set Files to fingerprint to
aggregate - Publish JUnit test result report (report files from B and C)
Job B:
Build Steps
- Copy artifacts from another project: copy from upstream job
aggregatefile - Run tests to generate unit test reports
- Trigger Parametrized Build Job: Job C
It ultimately fails here because
aggregateis only archived in the Post Build Steps of Job A. How can I archive an artifact in the Build Step?
Post Build Steps
- Aggregate downstream test results (unit test.xml generated)
- Record fingerprints of files to track usage: set Files to fingerprint to
aggregate
I won't post Job C here for simplicity but it follows pretty much what B does.
So, summing it up, I want to have interlinked jobs that depend on each other and uses the parametrized plugin and the upstream job must aggregate the test results of all downstream.
Any help appreciated, thanks!