Skip to content

Commit

Permalink
fix merge
Browse files Browse the repository at this point in the history
  • Loading branch information
ovcharenko-di committed Nov 27, 2024
1 parent c330424 commit 814957a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ class JobConfiguration implements Serializable {
@JsonPropertyDescription("Настройки замеров покрытия")
CoverageOptions coverageOptions;

@JsonProperty("coverage")
@JsonPropertyDescription("Настройки замеров покрытия")
CoverageOptions coverageOptions;

@JsonProperty("yaxunit")
@JsonPropertyDescription("Настройки YAXUnit")
YaxunitOptions yaxunitOptions
Expand Down
29 changes: 0 additions & 29 deletions src/ru/pulsar/jenkins/library/steps/SonarScanner.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
3 changes: 1 addition & 2 deletions src/ru/pulsar/jenkins/library/steps/Yaxunit.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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())

Expand All @@ -134,5 +134,4 @@ class Yaxunit implements Serializable {
steps.stash(COVERAGE_STASH_NAME, COVERAGE_STASH_PATH, true)
}
}

}

0 comments on commit 814957a

Please sign in to comment.