From b00f43811b211e3c25f69c7211347d472953d35d Mon Sep 17 00:00:00 2001 From: "aleksandr.vodyanov" Date: Thu, 18 Jul 2024 11:01:35 +0300 Subject: [PATCH] [DO-736] fix main branch (!30) Reviewed-on: https://git.avroid.tech/DevOps/jenkins-pipelines/pulls/30 Co-authored-by: aleksandr.vodyanov Co-committed-by: aleksandr.vodyanov --- pipelines/DevSecOps/svace-analyze.groovy | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/pipelines/DevSecOps/svace-analyze.groovy b/pipelines/DevSecOps/svace-analyze.groovy index 4abd916..49073e7 100644 --- a/pipelines/DevSecOps/svace-analyze.groovy +++ b/pipelines/DevSecOps/svace-analyze.groovy @@ -8,7 +8,7 @@ String svaceVersion = '3.4.240312' String svacerVersion = '8-0-1' String svaceCmd = "/data/opt/svace-${svaceVersion}-x64-linux/bin/svace" String svacerCmd = "/data/opt/svacer-${svacerVersion}/bin/svacer" -String svaceBuildResult = '' +String svaceBuildResults = '' String commitShortSha = '' String svaceResultsDir = 'svace_analysis' String svaceSarifResultFile = "svace_analysis.sarif2" @@ -64,14 +64,6 @@ node('svace') { } stage('Svace analyze') { - String branch = params.BRANCH - String mainBranch = params.MAIN_BRANCH - - if (params.BUILD_PLATFORM) { - branch += params.BRANCH - mainBranch += params.MAIN_BRANCH - } - sh """ tar -xf ${svaceBuildResults} ${svaceCmd} config --svace-dir ./${svaceResultsDir} THREAD_NUMBER ${buildThreads} @@ -85,6 +77,14 @@ node('svace') { passwordVariable: 'SVACER_PASS' )]) { stage('Upload results') { + String branch = params.BRANCH + String mainBranch = params.MAIN_BRANCH + + if (params.BUILD_PLATFORM) { + branch += params.BRANCH + mainBranch += params.MAIN_BRANCH + } + nexusSvaceSarifRepoPath = "${params.GIT_PROJECT}/${params.BRANCH}/${commitShortSha}" sh """ ${svaceCmd} svres2sarif \