multiple recordIssues for parallel steps

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

multiple recordIssues for parallel steps

Olivier Lamy-2
Hi,
I have a build with 3 parallel branch sort of matrix: same build with different jdk.
I'd like to have something such in parallel steps
mavenbuild
recordIssues id: "jdk8", enabledForFailure: true, tools: [mavenConsole(), java(), checkStyle(), spotBugs(), pmdParser()]

mavenbuild
recordIssues id: "jdk11", enabledForFailure: true, tools: [mavenConsole(), java(), checkStyle(), spotBugs(), pmdParser()]

mavenbuild
recordIssues id: "jdk15", enabledForFailure: true, tools: [mavenConsole(), java(), checkStyle(), spotBugs(), pmdParser()]

But I turn to an issue such:

Also: java.lang.IllegalStateException: ID maven-warnings is already used by another action: io.jenkins.plugins.analysis.core.model.ResultAction for Maven java.lang.IllegalStateException: ID maven-warnings is already used by another action: io.jenkins.plugins.analysis.core.model.ResultAction for Maven at io.jenkins.plugins.analysis.core.steps.IssuesPublisher.ensureThatIdIsUnique(IssuesPublisher.java:156) at io.jenkins.plugins.analysis.core.steps.IssuesPublisher.attachAction(IssuesPublisher.java:107) at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.publishResult(IssuesRecorder.java:721) at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.record(IssuesRecorder.java:651) at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.perform(IssuesRecorder.java:617) at io.jenkins.plugins.analysis.core.steps.RecordIssuesStep$Execution.run(RecordIssuesStep.java:1024) at io.jenkins.plugins.analysis.core.steps.RecordIssuesStep$Execution.run(RecordIssuesStep.java:985)




Is there anyway to have multiple report for different jdks 
thanks
--
Olivier 

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAPoyBqQdJES2XP0E80N-0iFF_vjXBoYA2MDfvJ0nmO%3DUS9y-cg%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: multiple recordIssues for parallel steps

Ulli Hafner
This is possible, yes. One way is to create an aggregation for each JDK:

recordIssues aggregatingResults: true, id: "jdk8", enabledForFailure: true, tools: [mavenConsole(), java(), checkStyle(), spotBugs(), pmdParser()]

Then you will get 3 results, one for each JDK.

Or if you want to get 15 results you need to write 15 calls (one for each single tool). Your approach does not work since it is just a shortcut to autogenerate 5 results with a single call (and that obviously does not create different IDs).

recordIssues id: „jdk8-maven", enabledForFailure: true, tool: mavenConsole()
recordIssues id: „jdk8-pmd", enabledForFailure: true, tool: pmdParser()



Am 26.11.2020 um 09:47 schrieb Olivier Lamy <[hidden email]>:

Hi,
I have a build with 3 parallel branch sort of matrix: same build with different jdk.
I'd like to have something such in parallel steps
mavenbuild
recordIssues id: "jdk8", enabledForFailure: true, tools: [mavenConsole(), java(), checkStyle(), spotBugs(), pmdParser()]

mavenbuild
recordIssues id: "jdk11", enabledForFailure: true, tools: [mavenConsole(), java(), checkStyle(), spotBugs(), pmdParser()]

mavenbuild
recordIssues id: "jdk15", enabledForFailure: true, tools: [mavenConsole(), java(), checkStyle(), spotBugs(), pmdParser()]

But I turn to an issue such:

Also: java.lang.IllegalStateException: ID maven-warnings is already used by another action: io.jenkins.plugins.analysis.core.model.ResultAction for Maven java.lang.IllegalStateException: ID maven-warnings is already used by another action: io.jenkins.plugins.analysis.core.model.ResultAction for Maven at io.jenkins.plugins.analysis.core.steps.IssuesPublisher.ensureThatIdIsUnique(IssuesPublisher.java:156) at io.jenkins.plugins.analysis.core.steps.IssuesPublisher.attachAction(IssuesPublisher.java:107) at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.publishResult(IssuesRecorder.java:721) at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.record(IssuesRecorder.java:651) at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.perform(IssuesRecorder.java:617) at io.jenkins.plugins.analysis.core.steps.RecordIssuesStep$Execution.run(RecordIssuesStep.java:1024) at io.jenkins.plugins.analysis.core.steps.RecordIssuesStep$Execution.run(RecordIssuesStep.java:985)




Is there anyway to have multiple report for different jdks 
thanks
--
Olivier 

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAPoyBqQdJES2XP0E80N-0iFF_vjXBoYA2MDfvJ0nmO%3DUS9y-cg%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/5EFD21AC-B263-4F79-919D-E438E788B9EB%40gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: multiple recordIssues for parallel steps

Olivier Lamy-2
This works perfectly! Thanks a lot!

cheers
Olivier

On Thu, 26 Nov 2020 at 21:48, Ullrich Hafner <[hidden email]> wrote:
This is possible, yes. One way is to create an aggregation for each JDK:

recordIssues aggregatingResults: true, id: "jdk8", enabledForFailure: true, tools: [mavenConsole(), java(), checkStyle(), spotBugs(), pmdParser()]

Then you will get 3 results, one for each JDK.

Or if you want to get 15 results you need to write 15 calls (one for each single tool). Your approach does not work since it is just a shortcut to autogenerate 5 results with a single call (and that obviously does not create different IDs).

recordIssues id: „jdk8-maven", enabledForFailure: true, tool: mavenConsole()
recordIssues id: „jdk8-pmd", enabledForFailure: true, tool: pmdParser()



Am 26.11.2020 um 09:47 schrieb Olivier Lamy <[hidden email]>:

Hi,
I have a build with 3 parallel branch sort of matrix: same build with different jdk.
I'd like to have something such in parallel steps
mavenbuild
recordIssues id: "jdk8", enabledForFailure: true, tools: [mavenConsole(), java(), checkStyle(), spotBugs(), pmdParser()]

mavenbuild
recordIssues id: "jdk11", enabledForFailure: true, tools: [mavenConsole(), java(), checkStyle(), spotBugs(), pmdParser()]

mavenbuild
recordIssues id: "jdk15", enabledForFailure: true, tools: [mavenConsole(), java(), checkStyle(), spotBugs(), pmdParser()]

But I turn to an issue such:

Also: java.lang.IllegalStateException: ID maven-warnings is already used by another action: io.jenkins.plugins.analysis.core.model.ResultAction for Maven java.lang.IllegalStateException: ID maven-warnings is already used by another action: io.jenkins.plugins.analysis.core.model.ResultAction for Maven at io.jenkins.plugins.analysis.core.steps.IssuesPublisher.ensureThatIdIsUnique(IssuesPublisher.java:156) at io.jenkins.plugins.analysis.core.steps.IssuesPublisher.attachAction(IssuesPublisher.java:107) at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.publishResult(IssuesRecorder.java:721) at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.record(IssuesRecorder.java:651) at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.perform(IssuesRecorder.java:617) at io.jenkins.plugins.analysis.core.steps.RecordIssuesStep$Execution.run(RecordIssuesStep.java:1024) at io.jenkins.plugins.analysis.core.steps.RecordIssuesStep$Execution.run(RecordIssuesStep.java:985)




Is there anyway to have multiple report for different jdks 
thanks
--
Olivier 

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAPoyBqQdJES2XP0E80N-0iFF_vjXBoYA2MDfvJ0nmO%3DUS9y-cg%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/5EFD21AC-B263-4F79-919D-E438E788B9EB%40gmail.com.


--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CAPoyBqTjsXo8C00TNZoivSwMehZc%2BZMd%3D%3DYsT_ajA%2B8-tQpc5g%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: multiple recordIssues for parallel steps

Jesse Glick-4
In reply to this post by Olivier Lamy-2
I would disable SpotBugs, Checkstyle, and PMD on all but one branch, since the results should be a function of the source code, not the build environment.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr3UsYEbwsgHVm8kOU5jsezBmxwUYYWShJbzyvSfc9-Cgw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: multiple recordIssues for parallel steps

Ulli Hafner
SpotBugs actually works on the byte code level so there might be some different results due to the different compiler results (in theory). But I doubt that you get different results in practice. 
In Jenkins CI we also record issues only for the first environment and skip it for subsequent calls (at least the Jenkins Plugin is not running, maven still runs mvn verify).


Am 29.11.2020 um 23:20 schrieb Jesse Glick <[hidden email]>:

I would disable SpotBugs, Checkstyle, and PMD on all but one branch, since the results should be a function of the source code, not the build environment.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr3UsYEbwsgHVm8kOU5jsezBmxwUYYWShJbzyvSfc9-Cgw%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/D9403F7D-8AB5-4853-9ADD-02A3B173DA19%40gmail.com.