From bf3fb2ddda34835bceddf073a4451b5992e02b33 Mon Sep 17 00:00:00 2001 From: Dima Date: Wed, 24 Jul 2024 12:40:50 +0300 Subject: [PATCH] fix errors --- .../library/configuration/GenericIssueFormat.groovy | 9 +++++++++ .../library/configuration/ResultsTransformOptions.groovy | 1 - .../jenkins/library/steps/ResultsTransformer.groovy | 4 ++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/ru/pulsar/jenkins/library/configuration/GenericIssueFormat.groovy b/src/ru/pulsar/jenkins/library/configuration/GenericIssueFormat.groovy index c9cfce1..8775c6f 100644 --- a/src/ru/pulsar/jenkins/library/configuration/GenericIssueFormat.groovy +++ b/src/ru/pulsar/jenkins/library/configuration/GenericIssueFormat.groovy @@ -9,4 +9,13 @@ enum GenericIssueFormat { @JsonProperty("Generic_Issue_10_3") GENERIC_ISSUE_10_3 + @Override + String toString() { + switch(this) { + case GENERIC_ISSUE: return "Generic_Issue" + case GENERIC_ISSUE_10_3: return "Generic_Issue_10_3" + default: throw new IllegalArgumentException() + } + } + } \ No newline at end of file diff --git a/src/ru/pulsar/jenkins/library/configuration/ResultsTransformOptions.groovy b/src/ru/pulsar/jenkins/library/configuration/ResultsTransformOptions.groovy index 363d0a6..2876709 100644 --- a/src/ru/pulsar/jenkins/library/configuration/ResultsTransformOptions.groovy +++ b/src/ru/pulsar/jenkins/library/configuration/ResultsTransformOptions.groovy @@ -27,7 +27,6 @@ class ResultsTransformOptions implements Serializable { Для SonarQube 10.3+ необходимо использовать Generic_Issue_10_3. По умолчанию Generic_Issue """) - GenericIssueFormat genericIssueFormat = GenericIssueFormat.GENERIC_ISSUE @Override diff --git a/src/ru/pulsar/jenkins/library/steps/ResultsTransformer.groovy b/src/ru/pulsar/jenkins/library/steps/ResultsTransformer.groovy index b32174e..ce949de 100644 --- a/src/ru/pulsar/jenkins/library/steps/ResultsTransformer.groovy +++ b/src/ru/pulsar/jenkins/library/steps/ResultsTransformer.groovy @@ -46,11 +46,11 @@ class ResultsTransformer implements Serializable { def genericIssueFile = "$env.WORKSPACE/$RESULT_FILE" def genericIssuesFormat = config.resultsTransformOptions.genericIssueFormat - steps.cmd("stebi convert --format $genericIssuesFormat -r $edtValidateFile $genericIssueFile $srcDir") + steps.cmd("stebi convert --Format $genericIssuesFormat -r $edtValidateFile $genericIssueFile $srcDir") if (config.resultsTransformOptions.removeSupport) { def supportLevel = config.resultsTransformOptions.supportLevel - steps.cmd("stebi transform --format $genericIssuesFormat --remove_support $supportLevel --src $srcDir $genericIssueFile") + steps.cmd("stebi transform --Format $genericIssuesFormat --remove_support $supportLevel --src $srcDir $genericIssueFile") } } else {