diff --git a/documentation/docs/extensibility.md b/documentation/docs/extensibility.md index f8249ddc3a..63a9c245e6 100644 --- a/documentation/docs/extensibility.md +++ b/documentation/docs/extensibility.md @@ -91,7 +91,7 @@ def call(Map parameters) { goals: ['checkstyle:checkstyle'], ) - recordIssues blameDisabled: true, + recordIssues skipBlames: true, enabledForFailure: true, aggregatingResults: false, tool: checkStyle() diff --git a/resources/default_pipeline_environment.yml b/resources/default_pipeline_environment.yml index 38392ffee9..4cb1b817a7 100644 --- a/resources/default_pipeline_environment.yml +++ b/resources/default_pipeline_environment.yml @@ -415,7 +415,7 @@ steps: parserPattern: '\[(INFO|WARNING|ERROR)\] (.*) \(([^) ]*)\/([^) ]*)\)' parserScript: 'return builder.guessSeverity(matcher.group(1)).setMessage(matcher.group(2)).setModuleName(matcher.group(3)).setType(matcher.group(4)).buildOptional()' recordIssuesSettings: - blameDisabled: true + skipBlames: true enabledForFailure: true seleniumExecuteTests: buildTool: 'npm' diff --git a/test/groovy/PiperPublishWarningsTest.groovy b/test/groovy/PiperPublishWarningsTest.groovy index f8d42f63d9..aa351e512f 100644 --- a/test/groovy/PiperPublishWarningsTest.groovy +++ b/test/groovy/PiperPublishWarningsTest.groovy @@ -85,7 +85,7 @@ class PiperPublishWarningsTest extends BasePiperTest { assertThat(warningsParserSettings, hasKey('script')) assertThat(warningsPluginOptions, allOf( hasEntry('enabledForFailure', true), - hasEntry('blameDisabled', true) + hasEntry('skipBlames', true) )) assertThat(warningsPluginOptions, hasKey('tools')) diff --git a/vars/checksPublishResults.groovy b/vars/checksPublishResults.groovy index c7561b5f39..b0f1a03965 100644 --- a/vars/checksPublishResults.groovy +++ b/vars/checksPublishResults.groovy @@ -133,8 +133,13 @@ void call(Map parameters = [:]) { def report(tool, settings, doArchive){ def options = createOptions(settings).plus([tools: [tool]]) echo "recordIssues OPTIONS: ${options}" - // publish - recordIssues(options) + try { + // publish + recordIssues(options) + } catch (e) { + echo "recordIssues has failed. Possibly due to an outdated version of the warnings-ng plugin." + e.printStackTrace() + } // archive check results archiveResults(doArchive && settings.get('archive'), settings.get('pattern'), true) } @@ -149,7 +154,7 @@ def archiveResults(archive, pattern, allowEmpty){ @NonCPS def createOptions(settings){ Map result = [:] - result.put('blameDisabled', true) + result.put('skipBlames', true) result.put('enabledForFailure', true) result.put('aggregatingResults', false) diff --git a/vars/hadolintExecute.groovy b/vars/hadolintExecute.groovy index 409e461447..9a5e12f8d3 100644 --- a/vars/hadolintExecute.groovy +++ b/vars/hadolintExecute.groovy @@ -40,16 +40,21 @@ def issuesWrapper(Map parameters = [:], Script script, Closure body){ try { body() } finally { - recordIssues( - blameDisabled: true, - enabledForFailure: true, - aggregatingResults: false, - qualityGates: config.qualityGates, - tool: checkStyle( - id: config.reportName, - name: config.reportName, - pattern: config.reportFile + try { + recordIssues( + skipBlames: true, + enabledForFailure: true, + aggregatingResults: false, + qualityGates: config.qualityGates, + tool: checkStyle( + id: config.reportName, + name: config.reportName, + pattern: config.reportFile + ) ) - ) + } catch (e) { + echo "recordIssues has failed. Possibly due to an outdated version of the warnings-ng plugin." + e.printStackTrace() + } } } diff --git a/vars/mavenExecuteStaticCodeChecks.groovy b/vars/mavenExecuteStaticCodeChecks.groovy index cf03413796..3ce4595444 100644 --- a/vars/mavenExecuteStaticCodeChecks.groovy +++ b/vars/mavenExecuteStaticCodeChecks.groovy @@ -29,18 +29,27 @@ private showIssues(Script script) { Map configuration = ConfigurationLoader.stepConfiguration(script, STEP_NAME) // Every check is executed by default. Only if configured with `false` the check won't be executed if (!(configuration.spotBugs == false)) { - recordIssues(blameDisabled: true, - enabledForFailure: true, - aggregatingResults: false, - tool: spotBugs(pattern: '**/target/spotbugsXml.xml')) - + try { + recordIssues(skipBlames: true, + enabledForFailure: true, + aggregatingResults: false, + tool: spotBugs(pattern: '**/target/spotbugsXml.xml')) + } catch (e) { + echo "recordIssues has failed. Possibly due to an outdated version of the warnings-ng plugin." + e.printStackTrace() + } ReportAggregator.instance.reportStaticCodeExecution(QualityCheck.FindbugsCheck) } if (!(configuration.pmd == false)) { - recordIssues(blameDisabled: true, - enabledForFailure: true, - aggregatingResults: false, - tool: pmdParser(pattern: '**/target/pmd.xml')) + try { + recordIssues(skipBlames: true, + enabledForFailure: true, + aggregatingResults: false, + tool: pmdParser(pattern: '**/target/pmd.xml')) + } catch (e) { + echo "recordIssues has failed. Possibly due to an outdated version of the warnings-ng plugin." + e.printStackTrace() + } ReportAggregator.instance.reportStaticCodeExecution(QualityCheck.PmdCheck) } } diff --git a/vars/npmExecuteLint.groovy b/vars/npmExecuteLint.groovy index 462deebc42..5b2c9bdcce 100644 --- a/vars/npmExecuteLint.groovy +++ b/vars/npmExecuteLint.groovy @@ -25,8 +25,13 @@ void call(Map parameters = [:]) { } private visualizeLintingResults(Script script) { - recordIssues blameDisabled: true, - enabledForFailure: true, - aggregatingResults: false, - tool: script.checkStyle(id: "lint", name: "Lint", pattern: "*lint.xml") + try { + recordIssues skipBlames: true, + enabledForFailure: true, + aggregatingResults: false, + tool: script.checkStyle(id: "lint", name: "Lint", pattern: "*lint.xml") + } catch (e) { + echo "recordIssues has failed. Possibly due to an outdated version of the warnings-ng plugin." + e.printStackTrace() + } }