Merge lp://staging/~twom/ols-jenkaas/junit-for-sca into lp://staging/ols-jenkaas

Proposed by Tom Wardill
Status: Merged
Merged at revision: 566
Proposed branch: lp://staging/~twom/ols-jenkaas/junit-for-sca
Merge into: lp://staging/ols-jenkaas
Diff against target: 14 lines (+4/-0)
1 file modified
jobs/software-center-agent.yaml (+4/-0)
To merge this branch: bzr merge lp://staging/~twom/ols-jenkaas/junit-for-sca
Reviewer Review Type Date Requested Status
Daniel Manrique (community) Approve
Review via email: mp+341927@code.staging.launchpad.net

Commit message

Add a junit publisher for SCA

Description of the change

Add a junit publisher for SCA, using the workdir/results/ dir

To post a comment you must log in.
Revision history for this message
Daniel Manrique (roadmr) wrote :

I think the indentation is a bit off, and you'll need to allow empty results, otherwise if for some reason the subunit data is not generated, the job will fail, which is annoying.

Example from the docker projects (and this is tested working):

=== modified file jobs/project-docker.yaml
--- jobs/project-docker.yaml 2018-02-28 17:22:12 +0000
+++ jobs/project-docker.yaml 2018-03-13 15:55:57 +0000
@@ -59,6 +59,10 @@
             property-file: build-params.prop
             node-parameters: true
             condition: 'UNSTABLE_OR_BETTER'
+ - junit:
+ results: '{workdir}/reports/*.xml'
+ allow-empty-results: true
+

Also - I see "results" in your job specification, whereas the Makefile outputs to "reports" (which we said is good because it's also already .gitignored). so that'll need an update too.

review: Needs Fixing
570. By Tom Wardill

Allow empty results, use correct directory

Revision history for this message
Daniel Manrique (roadmr) wrote :

+1 thanks!

review: Approve
Revision history for this message
Daniel Manrique (roadmr) wrote :

Sadly this didn't work :( and the same thing happened to me so I should have known about this.

Publisher configuration can't be put in a project definition; it needs to be put in the job-template definition.

The problem-ish here is that adding the publisher to the widely-used {name} job-template, will cause every single code merge job to have a junit publisher.

It's not a huge issue though because allow-empty-results: true will simply do nothing if there're no reports for a specific project.

Still, I didn't want to just apply the change without consulting people first, given the work you've done on this.

(Of course, there may be another way of doing this with jenkins-job-builder which I'm missing).

The diff that'll move the junit publisher to the global landing job template is here:

https://pastebin.canonical.com/p/BNksFgNxTG/

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches