From 814957a1adb4ba0e620f3c86ae9ea044220f6597 Mon Sep 17 00:00:00 2001 From: Dima Date: Wed, 27 Nov 2024 12:53:08 +0300 Subject: [PATCH] fix merge --- .../configuration/JobConfiguration.groovy | 4 --- .../jenkins/library/steps/SonarScanner.groovy | 29 ------------------- .../jenkins/library/steps/Yaxunit.groovy | 3 +- 3 files changed, 1 insertion(+), 35 deletions(-) diff --git a/src/ru/pulsar/jenkins/library/configuration/JobConfiguration.groovy b/src/ru/pulsar/jenkins/library/configuration/JobConfiguration.groovy index 8e4468e8..accba947 100644 --- a/src/ru/pulsar/jenkins/library/configuration/JobConfiguration.groovy +++ b/src/ru/pulsar/jenkins/library/configuration/JobConfiguration.groovy @@ -60,10 +60,6 @@ class JobConfiguration implements Serializable { @JsonPropertyDescription("Настройки замеров покрытия") CoverageOptions coverageOptions; - @JsonProperty("coverage") - @JsonPropertyDescription("Настройки замеров покрытия") - CoverageOptions coverageOptions; - @JsonProperty("yaxunit") @JsonPropertyDescription("Настройки YAXUnit") YaxunitOptions yaxunitOptions diff --git a/src/ru/pulsar/jenkins/library/steps/SonarScanner.groovy b/src/ru/pulsar/jenkins/library/steps/SonarScanner.groovy index 56c56c96..8dcf1589 100644 --- a/src/ru/pulsar/jenkins/library/steps/SonarScanner.groovy +++ b/src/ru/pulsar/jenkins/library/steps/SonarScanner.groovy @@ -98,35 +98,6 @@ class SonarScanner implements Serializable { } - def stageFlags = config.stageFlags - - if (stageFlags.bdd && config.bddOptions.coverage - || stageFlags.smoke && config.smokeTestOptions.coverage - || stageFlags.yaxunit && config.yaxunitOptions.coverage) { - - StringJoiner coveragePathsConstructor = new StringJoiner(",") - - if (stageFlags.bdd && config.bddOptions.coverage) { - steps.unstash(Bdd.COVERAGE_STASH_NAME) - coveragePathsConstructor.add(Bdd.COVERAGE_STASH_PATH) - } - - if (stageFlags.smoke && config.smokeTestOptions.coverage) { - steps.unstash(SmokeTest.COVERAGE_STASH_NAME) - coveragePathsConstructor.add(SmokeTest.COVERAGE_STASH_PATH) - } - - if (stageFlags.yaxunit && config.yaxunitOptions.coverage) { - steps.unstash(Yaxunit.COVERAGE_STASH_NAME) - coveragePathsConstructor.add(Yaxunit.COVERAGE_STASH_PATH) - } - - String coveragePaths = coveragePathsConstructor.toString() - - sonarCommand += " -Dsonar.coverageReportPaths=${coveragePaths}" - - } - if (config.sonarQubeOptions.waitForQualityGate) { def timeoutInSeconds = config.timeoutOptions.sonarqube * 60 sonarCommand += ' -Dsonar.qualitygate.wait=true' diff --git a/src/ru/pulsar/jenkins/library/steps/Yaxunit.groovy b/src/ru/pulsar/jenkins/library/steps/Yaxunit.groovy index 4a50a5f3..35fb9cfc 100644 --- a/src/ru/pulsar/jenkins/library/steps/Yaxunit.groovy +++ b/src/ru/pulsar/jenkins/library/steps/Yaxunit.groovy @@ -121,7 +121,7 @@ class Yaxunit implements Serializable { } if (options.publishToAllureReport) { - String allureReport = "./build/out/allure/yaxunit/junit.xml" + String allureReport = "./build/out/yaxunit/junit.xml" FilePath pathToAllureReport = FileUtils.getFilePath("$env.WORKSPACE/$allureReport") String allureReportDir = FileUtils.getLocalPath(pathToAllureReport.getParent()) @@ -134,5 +134,4 @@ class Yaxunit implements Serializable { steps.stash(COVERAGE_STASH_NAME, COVERAGE_STASH_PATH, true) } } - }