[JIRA] (JENKINS-55436) warnings-ng is not backwards compatible
Title: Message Title Ulli Hafner commented on JENKINS-55436 Re: warnings-ng is not backwards compatible Ok, I can confirm the bug. This definitely is a problem of declarative pipelines only: Started by user [Ulli Hafner|http://localhost:8080/user/hafner] Replayed [#38|http://localhost:8080/job/New%20-%20Pipeline%20Declarative%20-%20Model/38/] Running in Durability level: MAX_SURVIVABILITY org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: WorkflowScript: 26: Invalid parameter "canComputeNew", did you mean "name"? @ line 26, column 25. androidLint canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "**/lint*.xml", unHealthy: '', unstableTotalAll: '0' ^ WorkflowScript: 26: Invalid parameter "canRunOnFailed", did you mean "name"? @ line 26, column 47. oidLint canComputeNew: false, canRunOnFa ^ WorkflowScript: 26: Invalid parameter "defaultEncoding", did you mean "reportEncoding"? @ line 26, column 69. false, canRunOnFailed: true, defaultEnc ^ WorkflowScript: 26: Invalid parameter "healthy", did you mean "name"? @ line 26, column 90. d: true, defaultEncoding: '', healthy: ' ^ WorkflowScript: 26: Invalid parameter "unHealthy", did you mean "name"? @ line 26, column 133. pattern: "**/lint*.xml", unHealthy: ^ WorkflowScript: 26: Invalid parameter "unstableTotalAll", did you mean "name"? @ line 26, column 148. nt*.xml", unHealthy: '', unstableTo ^ 6 errors at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:310) at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1085) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:603) at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:581) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:558) at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:298) at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:268) at groovy.lang.GroovyShell.parseClass(GroovyShell.java:688) at groovy.lang.GroovyShell.parse(GroovyShell.java:700) at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.doParse(CpsGroovyShell.java:131) at org.jenkinsci.plugins.workflow.cps.CpsGroovyShell.reparse(CpsGroovyShell.java:125) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.parseScript(CpsFlowExecution.java:560) at org.jenkinsci.plugins.workflow.cps.CpsFlowExecution.start(CpsFlowExecution.java:521) at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:320) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:429) Finished: FAILURE
[JIRA] (JENKINS-55436) warnings-ng is not backwards compatible
Title: Message Title Ulli Hafner commented on JENKINS-55436 Re: warnings-ng is not backwards compatible Ah, this is a declarative pipeline, of course... I'll check this. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55436) warnings-ng is not backwards compatible
Title: Message Title Matthias Fuchs commented on JENKINS-55436 Re: warnings-ng is not backwards compatible Maybe this is caused by the syntax check performed for declarative pipelines. The actual lookup for which function to call works, while the lookup for the syntax finds the wrong function. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55436) warnings-ng is not backwards compatible
Title: Message Title Ulli Hafner commented on JENKINS-55436 Re: warnings-ng is not backwards compatible This is really strange. For node { stage ('Checkout') { git branch:'master', url: 'file:///Users/hafner/Development/git/analysis-model' } stage ('Build and Analysis') { def mvnHome = tool 'mvn-default' sh "${mvnHome}/bin/mvn --batch-mode -V -U -e clean test-compile -Dsurefire.useFile=false -Dmaven.test.failure.ignore" androidLint canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "**/lint*.xml", unHealthy: '', unstableTotalAll: '0' } } I get the output [Pipeline] androidLint [android-lint] Collecting Android Lint files... [android-lint] Searching for all files in /tmp/node1/workspace/JENKINS-55436 that match the pattern **/lint*.xml [android-lint] No files found. Configuration error? [android-lint] Ignore new warnings since this is the first valid build [android-lint] Plug-in Result: Success - no threshold has been exceeded [Pipeline] } Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55436) warnings-ng is not backwards compatible
Title: Message Title Matthias Fuchs commented on JENKINS-55436 Re: warnings-ng is not backwards compatible Yeah that worked for me too. So I did some further trials. And actually androidLint seems to be the culprit. The following declarative script fails for me pipeline { agent any stages { stage('Static Analysis') { steps { echo 'Hello World!' } post { always { // When uncommenting pmd and checkstyle but commenting out androidLint it works //pmd canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "pmd.xml", unHealthy: '', unstableTotalAll: '0' //checkstyle canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "checkstyle.xml", unHealthy: '', unstableTotalAll: '0' androidLint canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/lint*.xml", unHealthy: '', unstableTotalAll: '0' } } } } } Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55436) warnings-ng is not backwards compatible
Title: Message Title Ulli Hafner commented on JENKINS-55436 Re: warnings-ng is not backwards compatible I tried the following on my local machine: node { stage ('Checkout') { git branch:'master', url: 'file:///Users/hafner/Development/git/analysis-model' } stage ('Build and Analysis') { def mvnHome = tool 'mvn-default' sh "${mvnHome}/bin/mvn --batch-mode -V -U -e clean verify revapi:check -Dsurefire.useFile=false -Dmaven.test.failure.ignore" junit testResults: '**/target/surefire-reports/TEST-*.xml' pmd canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "target/pmd.xml",unHealthy: '', unstableTotalAll: '0' } } This works quite well with the PMD plugin 4.0.0 and warnings-ng plugin. There still seems to be something different in your configuration... [PMD] Collecting PMD analysis files... [PMD] Searching for all files in /Users/hafner/Development/jenkins/workspace/Old - Pipeline Model that match the pattern target/pmd.xml [PMD] Parsing 1 file in /Users/hafner/Development/jenkins/workspace/Old - Pipeline Model [PMD] Successfully parsed file /Users/hafner/Development/jenkins/workspace/Old - Pipeline Model/target/pmd.xml with 2 unique warnings and 0 duplicates. Skipping warnings blame since pipelines do not have an SCM link.%n [PMD] Ignore new warnings since this is the first valid build [PMD] Plug-in Result: Unstable - 2 warnings exceed the threshold of 0 by 2 Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)
[JIRA] (JENKINS-55436) warnings-ng is not backwards compatible
Title: Message Title Matthias Fuchs commented on JENKINS-55436 Re: warnings-ng is not backwards compatible Maybe the reason that checkstyle is working but not the others is the different names. In the checkstyle plugin the exposed symbol in the pipeline is check*s*tyle while warning-ng exposes check*S*tyle. Thus there is no clash. At the same time the exposed symbol for android lint is androidLint in both the android-lint plugin and the new plugin, respectively for pmd. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55436) warnings-ng is not backwards compatible
Title: Message Title Matthias Fuchs edited a comment on JENKINS-55436 Re: warnings-ng is not backwards compatible I updated the environment. Where If [this|https://github.com/jenkinsci/warnings-ng-plugin/blob/master/Jenkinsfile] is the Jenkinsfile placed you use to collect then I know why it works for you.You use fewer parameters in the results the old-style-way? calls to pmd etc. So that If I can try to replicate your results also use fewer parameters then it works as well . I just tried that.So the backward incompatibility is for some of the parameters, as also indicated by the parsing error. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55436) warnings-ng is not backwards compatible
Title: Message Title Matthias Fuchs commented on JENKINS-55436 Re: warnings-ng is not backwards compatible I updated the environment. Where is the Jenkinsfile placed you use to collect the results the old-style-way? So that I can try to replicate your results. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55436) warnings-ng is not backwards compatible
Title: Message Title Matthias Fuchs updated an issue Jenkins / JENKINS-55436 warnings-ng is not backwards compatible Change By: Matthias Fuchs Environment: JENKINS 2.156Arch LinuxRelevant installed plugins:warnings-ng 1.0.1 pmd 4.0.0 android-lint 2.6 checkstyle 4.0.0 workflow-cps 2.61.1 Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55436) warnings-ng is not backwards compatible
Title: Message Title Ulli Hafner commented on JENKINS-55436 Re: warnings-ng is not backwards compatible Interesting, on our CI we have both plugins working in parallel without problems: https://ci.jenkins.io/job/Plugins/job/warnings-ng-plugin/ https://ci.jenkins.io/job/Plugins/job/analysis-model/job/master/ Which version of the workflow cps plugin do you have installed? Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55436) warnings-ng is not backwards compatible
Title: Message Title Matthias Fuchs commented on JENKINS-55436 Re: warnings-ng is not backwards compatible I updated the story. Of course I have no issues with the design decision as long as I can have both the old and new plugins installed and working side-by-side. Which unfortunately does not seem to be the case, see my updates. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55436) warnings-ng is not backwards compatible
Title: Message Title Matthias Fuchs updated an issue Jenkins / JENKINS-55436 warnings-ng is not backwards compatible Change By: Matthias Fuchs Many of the jobs I use have collect static analysis the following way (OLD) :{code}pmd canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/pmd.xml",unHealthy: '', unstableTotalAll: '0'checkstyle canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/checkstyle.xml", unHealthy: '', unstableTotalAll: '0'androidLint canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/lint*.xml", unHealthy: '', unstableTotalAll: '0'{code}Now I want to migrate them to warnings-ng with the following code (NEW) :{code}recordIssues(tools: [androidLint(pattern: "$reports/lint*.xml"), checkStyle(pattern: "$reports/checkstyle.xml"), pmdParser(pattern: "$reports/pmd.xml")], aggregatingResults: true, enabledForFailure: true){code}I face multiple issues though:# warnings-ng is not backwards compatible due to different parameters it accepts# having the Android Lint plugin, the Checkstyle plugin, and the PMD plugin installed alongside warnings-ng breaks builds# This means that I have to transition *all* jobs to warnings-ng which is simply not feasible, given that there are multiple branches that are build and given our policies. Especially I would have to perform the transition at once to avoid failing builds.I think the plugin should be backwards compatible by accepting the additional parameters I listed above. Now when I build a job that uses OLD I get the following error:{noformat}org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:WorkflowScript: 67: Invalid parameter "canComputeNew", did you mean "name"? @ line 67, column 33. pmd canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/pmd.xml",unHealthy: '', unstableTotalAll: '0' ^WorkflowScript: 67: Invalid parameter "canRunOnFailed", did you mean "name"? @ line 67, column 55. canComputeNew: false, canRunOnFa ^WorkflowScript: 67: Invalid parameter "defaultEncoding", did you mean "reportEncoding"? @ line 67, column 77.false, canRunOnFailed: true, defaultEnc ^WorkflowScript: 67: Invalid parameter "healthy", did you mean "name"? @ line 67, column 98. d: true, defaultEncoding: '', healthy: ' ^WorkflowScript: 67: Invalid parameter "unHealthy", did you mean "name"? @ line 67, column 147. n: "$reports/pmd.xml",unHealthy: ^WorkflowScript: 67: Invalid parameter "unstableTotalAll", did you mean "name"? @ line 67, column 162. d.xml",unHealthy: '', unstableTo ^WorkflowScript: 69: Invalid parameter "canComputeNew", did you mean "name"? @ line 69, column 33. andro
[JIRA] (JENKINS-55436) warnings-ng is not backwards compatible
Title: Message Title Matthias Fuchs updated an issue Jenkins / JENKINS-55436 warnings-ng is not backwards compatible Change By: Matthias Fuchs Environment: JENKINS 2.156Arch Linux Relevant installed plugins:warnings-ngpmdandroid-lintcheckstyle Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55436) warnings-ng is not backwards compatible
Title: Message Title Ulli Hafner commented on JENKINS-55436 Re: warnings-ng is not backwards compatible warnings-ng is not backwards compatible due to different parameters it accepts Yes, this is a design design to provide a clean API. I don't think that it is feasible to provide a general one-to-one mapping of parameters. having the Android Lint plugin, the Checkstyle plugin, and the PMD plugin installed alongside warnings-ng breaks builds Why is that? This should be no problem at all. Can you please elaborate and create a different issue? This means that I have to transition all jobs to warnings-ng which is simply not feasible, given that there are multiple branches that are build and given our policies. Especially I would have to perform the transition at once to avoid failing builds. You should use a shared library for your analysis checks. Then you need to change the code in one place only. Add Comment This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] (JENKINS-55436) warnings-ng is not backwards compatible
Title: Message Title Matthias Fuchs created an issue Jenkins / JENKINS-55436 warnings-ng is not backwards compatible Issue Type: Bug Assignee: Ulli Hafner Components: warnings-ng-plugin Created: 2019-01-07 18:43 Environment: JENKINS 2.156 Arch Linux Priority: Major Reporter: Matthias Fuchs Many of the jobs I use have collect static analysis the following way: pmd canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/pmd.xml",unHealthy: '', unstableTotalAll: '0' checkstyle canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/checkstyle.xml", unHealthy: '', unstableTotalAll: '0' androidLint canComputeNew: false, canRunOnFailed: true, defaultEncoding: '', healthy: '', pattern: "$reports/lint*.xml", unHealthy: '', unstableTotalAll: '0' Now I want to migrate them to warnings-ng with the following code: recordIssues(tools: [androidLint(pattern: "$reports/lint*.xml"), checkStyle(pattern: "$reports/checkstyle.xml"), pmdParser(pattern: "$reports/pmd.xml")], aggregatingResults: true, enabledForFailure: true) I face m