-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Jenkins 2.499, version 12.2.0 and version 12.3.0 of the plugin
-
Powered by SuggestiMate
Hi,
If I publish multiple reports of a parser with differents id/name, links in build are broken and reports are published in wrong dir
To test (tried with other parsers, same result)
recordIssues tools: [junitParser(pattern: "a.xml", id: "a", name: "a")]
recordIssues tools: [junitParser(pattern: "b.xml", id: "b", name: "b")]
- logs.txt
- 5 kB
Hmm, this is strange. Can you test with the calls that I am using in my test:
https://github.com/jenkinsci/warnings-ng-plugin/blob/af79bad969ee064d524a74b1c5081bb8dff9a952/plugin/src/test/java/io/jenkins/plugins/analysis/warnings/steps/StepsITest.java#L583-L609
What is missing: what happens when you click on the link? What do you mean with broken?
Do you have access to the build.xml file in the Jenkins controller (/jenkins/job/job-name/builds/build-nr/build.xml)? Can you show what is stored in this file? There should be one part similar to:
<io.jenkins.plugins.analysis.core.model.ResultAction plugin="warnings-ng@12.2.0"> <result> <id>checkstyle</id> <totals> <totalErrorSize>0</totalErrorSize> <totalHighSize>0</totalHighSize> <totalNormalSize>0</totalNormalSize> <totalLowSize>0</totalLowSize> <totalModifiedSize>0</totalModifiedSize> <newErrorSize>0</newErrorSize> <newHighSize>0</newHighSize> <newNormalSize>0</newNormalSize> <newLowSize>0</newLowSize> <newModifiedSize>0</newModifiedSize> <deltaErrorSize>0</deltaErrorSize> <deltaHighSize>0</deltaHighSize> <deltaNormalSize>0</deltaNormalSize> <deltaLowSize>0</deltaLowSize> <fixedSize>0</fixedSize> <totalSizeBySeverity> <entry> <edu.hm.hafner.analysis.Severity reference="../../../../../../io.jenkins.plugins.analysis.core.model.ResultAction/result/totals/totalSizeBySeverity/entry/edu.hm.hafner.analysis.Severity"/> <int>0</int> </entry> <entry> <edu.hm.hafner.analysis.Severity reference="../../../../../../io.jenkins.plugins.analysis.core.model.ResultAction/result/totals/totalSizeBySeverity/entry[2]/edu.hm.hafner.analysis.Severity"/> <int>0</int> </entry> <entry> <edu.hm.hafner.analysis.Severity reference="../../../../../../io.jenkins.plugins.analysis.core.model.ResultAction/result/totals/totalSizeBySeverity/entry[3]/edu.hm.hafner.analysis.Severity"/> <int>0</int> </entry> <entry> <edu.hm.hafner.analysis.Severity reference="../../../../../../io.jenkins.plugins.analysis.core.model.ResultAction/result/totals/totalSizeBySeverity/entry[4]/edu.hm.hafner.analysis.Severity"/> <int>0</int> </entry> </totalSizeBySeverity> <newSizeBySeverity> <entry> <edu.hm.hafner.analysis.Severity reference="../../../../../../io.jenkins.plugins.analysis.core.model.ResultAction/result/totals/totalSizeBySeverity/entry/edu.hm.hafner.analysis.Severity"/> <int>0</int> </entry> <entry> <edu.hm.hafner.analysis.Severity reference="../../../../../../io.jenkins.plugins.analysis.core.model.ResultAction/result/totals/totalSizeBySeverity/entry[2]/edu.hm.hafner.analysis.Severity"/> <int>0</int> </entry> <entry> <edu.hm.hafner.analysis.Severity reference="../../../../../../io.jenkins.plugins.analysis.core.model.ResultAction/result/totals/totalSizeBySeverity/entry[3]/edu.hm.hafner.analysis.Severity"/> <int>0</int> </entry> <entry> <edu.hm.hafner.analysis.Severity reference="../../../../../../io.jenkins.plugins.analysis.core.model.ResultAction/result/totals/totalSizeBySeverity/entry[4]/edu.hm.hafner.analysis.Severity"/> <int>0</int> </entry> </newSizeBySeverity> </totals> <sizePerOrigin> <entry> <string>checkstyle</string> <int>0</int> </entry> </sizePerOrigin> <errors/> <messages> <string>Searching for all files in '/home/jenkins/agent/workspace/coverage-model-tags' that match the pattern 'target/**/checkstyle-result.xml'</string> <string>Traversing of symbolic links: enabled</string> <string>-> found 1 file</string> <string>Successfully parsed file /home/jenkins/agent/workspace/coverage-model-tags/target/checkstyle-result.xml</string> <string>-> found 0 issues (skipped 0 duplicates)</string> <string>Successfully processed file 'target/checkstyle-result.xml'</string> <string>Skipping post processing</string> <string>No filter has been set, publishing all 0 issues</string> <string>Extracting repository forensics for 0 affected files (files in repository: 115)</string> <string>-> 0 affected files processed</string> <string>Obtaining reference build from reference recorder</string> <string>-> No reference build recorded</string> <string>No valid reference build found</string> <string>All reported issues will be considered outstanding</string> <string>Evaluating quality gates</string> <string>-> All quality gates have been passed</string> <string>-> Details for each quality gate:</string> <string> - [Total (any severity)]: ≪Success≫ - (Actual value: 0, Quality gate: 10.00)</string> <string> - [Total (any severity)]: ≪Success≫ - (Actual value: 0, Quality gate: 100.00)</string> <string>Health report is disabled - skipping</string> <string>Created analysis result for 0 issues (found 0 new issues, fixed 0 issues)</string> <string>Attaching ResultAction with ID 'checkstyle' to build 'coverage-model-tags #1'.</string> </messages> <referenceBuildId></referenceBuildId> <noIssuesSinceBuild>1</noIssuesSinceBuild> <successfulSinceBuild>1</successfulSinceBuild> <qualityGateResult plugin="plugin-util-api@6.0.0"> <overallStatus>PASSED</overallStatus> <items> <item> <status>PASSED</status> <qualityGate class="io.jenkins.plugins.analysis.core.util.WarningsQualityGate" plugin="warnings-ng@12.2.0"> <threshold>10.0</threshold> <criticality>NOTE</criticality> <type>TOTAL</type> </qualityGate> <actualValue>0</actualValue> </item> <item> <status>PASSED</status> <qualityGate class="io.jenkins.plugins.analysis.core.util.WarningsQualityGate" plugin="warnings-ng@12.2.0"> <threshold>100.0</threshold> <criticality>ERROR</criticality> <type>TOTAL</type> </qualityGate> <actualValue>0</actualValue> </item> </items> </qualityGateResult> </result> <healthDescriptor> <healthy>0</healthy> <unhealthy>0</unhealthy> <minimumSeverity reference="../../../io.jenkins.plugins.analysis.core.model.ResultAction/result/totals/totalSizeBySeverity/entry[2]/edu.hm.hafner.analysis.Severity"/> </healthDescriptor> <id>checkstyle</id> <name></name> <icon></icon> <charset>UTF-8</charset> <trendChartType>AGGREGATION_TOOLS</trendChartType> </io.jenkins.plugins.analysis.core.model.ResultAction>
I tested with same code, if no file match pattern or if file is empty, everything is ok, links on left column and on central part use custom id (http://.../job/test-pipeline/263/custom-id/info/) and report is available
But if file exists and is not empty, it's ko.
Link on central part is ok (http://.../job/test-pipeline/263/custom-id/info/) but on click I'm redirected to build page, there is no report.
And link on left column don't use custom id (http://.../job/test-pipeline/263/javadoc-warnings/info/) but on click report is available.
For information, I tried to put custom id name on rool level, on tool, I tried to use scan followed by publish, I tried agregation... nothing to do, reports are always on wrong url on only the first one of each parser is available.
The build.xml file
<io.jenkins.plugins.analysis.core.model.ResultAction plugin="warnings-ng@12.3.0"> <result> <id>custom-id</id> <totals> <totalErrorSize>0</totalErrorSize> <totalHighSize>0</totalHighSize> <totalNormalSize>0</totalNormalSize> <totalLowSize>0</totalLowSize> <totalModifiedSize>0</totalModifiedSize> <newErrorSize>0</newErrorSize> <newHighSize>0</newHighSize> <newNormalSize>0</newNormalSize> <newLowSize>0</newLowSize> <newModifiedSize>0</newModifiedSize> <deltaErrorSize>0</deltaErrorSize> <deltaHighSize>0</deltaHighSize> <deltaNormalSize>0</deltaNormalSize> <deltaLowSize>0</deltaLowSize> <fixedSize>0</fixedSize> <totalSizeBySeverity> <entry> <edu.hm.hafner.analysis.Severity plugin="analysis-model-api@13.2.0"> <name>HIGH</name> </edu.hm.hafner.analysis.Severity> <int>0</int> </entry> <entry> <edu.hm.hafner.analysis.Severity plugin="analysis-model-api@13.2.0"> <name>LOW</name> </edu.hm.hafner.analysis.Severity> <int>0</int> </entry> <entry> <edu.hm.hafner.analysis.Severity plugin="analysis-model-api@13.2.0"> <name>ERROR</name> </edu.hm.hafner.analysis.Severity> <int>0</int> </entry> <entry> <edu.hm.hafner.analysis.Severity plugin="analysis-model-api@13.2.0"> <name>NORMAL</name> </edu.hm.hafner.analysis.Severity> <int>0</int> </entry> </totalSizeBySeverity> <newSizeBySeverity> <entry> <edu.hm.hafner.analysis.Severity reference="../../../totalSizeBySeverity/entry/edu.hm.hafner.analysis.Severity"/> <int>0</int> </entry> <entry> <edu.hm.hafner.analysis.Severity reference="../../../totalSizeBySeverity/entry[2]/edu.hm.hafner.analysis.Severity"/> <int>0</int> </entry> <entry> <edu.hm.hafner.analysis.Severity reference="../../../totalSizeBySeverity/entry[3]/edu.hm.hafner.analysis.Severity"/> <int>0</int> </entry> <entry> <edu.hm.hafner.analysis.Severity reference="../../../totalSizeBySeverity/entry[4]/edu.hm.hafner.analysis.Severity"/> <int>0</int> </entry> </newSizeBySeverity> </totals> <sizePerOrigin> <entry> <string>javadoc-warnings</string> <int>0</int> </entry> </sizePerOrigin> <errors/> <messages> <string>Searching for all files in '/var/lib/jenkins/workspace/test-pipeline' that match the pattern '**/*issues.txt'</string> <string>Traversing of symbolic links: enabled</string> <string>-> found 1 file</string> <string>Successfully parsed file /var/lib/jenkins/workspace/test-pipeline/issues.txt</string> <string>-> found 0 issues (skipped 0 duplicates)</string> <string>Successfully processed file 'issues.txt'</string> <string>Skipping post processing</string> <string>No filter has been set, publishing all 0 issues</string> <string>Repository miner is not configured, skipping repository mining</string> <string>Reference build recorder is not configured</string> <string>No valid reference build found</string> <string>All reported issues will be considered outstanding</string> <string>No quality gates have been set - skipping</string> <string>Health report is disabled - skipping</string> <string>Created analysis result for 0 issues (found 0 new issues, fixed 0 issues)</string> <string>Attaching ResultAction with ID 'custom-id' to build 'test-pipeline #270'.</string> </messages> <referenceBuildId></referenceBuildId> <noIssuesSinceBuild>261</noIssuesSinceBuild> <successfulSinceBuild>-1</successfulSinceBuild> <qualityGateResult plugin="plugin-util-api@6.0.0"> <overallStatus>INACTIVE</overallStatus> <items/> </qualityGateResult> </result> <healthDescriptor> <healthy>0</healthy> <unhealthy>0</unhealthy> <minimumSeverity reference="../../result/totals/totalSizeBySeverity/entry[2]/edu.hm.hafner.analysis.Severity"/> </healthDescriptor> <id>custom-id</id> <name>custom-name</name> <icon>custom-icon</icon> <charset>UTF-8</charset> <trendChartType>AGGREGATION_TOOLS</trendChartType> </io.jenkins.plugins.analysis.core.model.ResultAction>
Just for information, I test with only on report and same behavior, in fact, custom id is never used to store report