As far as I know, the feature “Aggregate downstream test results” does not work as expected (and it is very hard to find useful documentation). I’d like to achieve very similar functionality:
Job Build triggers jobs T1, T2 in parallel (where T1 does FindBugs, T2 does PMD).
Scenario 1:
As soon as T1 and T2 are finished (which I can achieve using the “Join” plugin) I want to gather the artifacts (T1/findbugs.xml and T2/pmd.xml). Then these are analyzed and nice statistics are generated.
Scenario 2 (I like this more):
Like scenario 1, but the analysis is done as part of T1 and T2 (in parallel!). As soon as T1 and T2 are finished, the analysis results are combined into nice statistics.
My questions:
For scenario 1 I do not know how to reference the downstream projects T1 and T2. I could use the last successful build, but that seems weird when considering many parallel jobs.
For scenario 2 I have no idea how to import the data that is needed for the FindBugs/PMD/Checkstyle/SLOCcount/… plugins so that the corresponding graphs (also?) appear outside of T1/*T2*.
Thanks,
Carsten
Two additions to malenkiy_scot’s post:
You don’t actually need a script for step 3 in the description: The “copy artifacts from another project” build step allows specifying the source job including parameters already.
For example, using the parent’s notation, it can copy artifacts from the correct execution of job
Dby usingD/PARENT_ID=EXPECTED_VALUEas the “project name”.Instead of manually concatenating
$JOB_NAMEand$BUILD_IDyou can use the predefined$BUILD_TAG(which does essentially the same). See https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project#Buildingasoftwareproject-JenkinsSetEnvironmentVariables for the full list of standard environment variables.