From 6d2a1b6a5e18d9d9c885b8dfc94f445344af0f24 Mon Sep 17 00:00:00 2001 From: Aleksandr Vodyanov Date: Wed, 29 Jan 2025 16:50:01 +0300 Subject: [PATCH] [DO-1528] fix svace and svacer pathes (!70) Co-authored-by: aleksandr.vodyanov Reviewed-on: https://git.avroid.tech/DevOps/jenkins-pipelines/pulls/70 --- pipelines/DevSecOps/svace-analyze.groovy | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pipelines/DevSecOps/svace-analyze.groovy b/pipelines/DevSecOps/svace-analyze.groovy index 4e22d78..a4125c4 100644 --- a/pipelines/DevSecOps/svace-analyze.groovy +++ b/pipelines/DevSecOps/svace-analyze.groovy @@ -4,6 +4,8 @@ import tech.avroid.api.Nexus import tech.avroid.scm.Git String buildThreads = '28' +String svaceCmd = '/data/opt/svace/bin/svace' +String svacerCmd = '/data/opt/svacer/bin/svacer' String svaceBuildResults = '' String commitShortSha = '' String ldapServer = 'FreeIPA' @@ -78,8 +80,8 @@ node('svace') { stage('Svace analyze') { sh """ tar -xf ${svaceBuildResults} - svace config --svace-dir ./${env.JENKINS_SVACE_BUILD_DIR} THREAD_NUMBER ${buildThreads} - svace analyze --log-level brief --svace-dir ./${env.JENKINS_SVACE_BUILD_DIR} + ${svaceCmd} config --svace-dir ./${env.JENKINS_SVACE_BUILD_DIR} THREAD_NUMBER ${buildThreads} + ${svaceCmd} analyze --log-level brief --svace-dir ./${env.JENKINS_SVACE_BUILD_DIR} """ } @@ -97,20 +99,20 @@ node('svace') { } sh """ - svace svres2sarif \ + ${svaceCmd} svres2sarif \ ${env.JENKINS_SVACE_BUILD_DIR}/.svace-dir/analyze-res/svace_analysis.svres \ -o ${env.JENKINS_SVACE_SARIF_FILE} cd ${env.JENKINS_SVACE_BUILD_DIR} - svacer import --svace svace \ + ${svacerCmd} import --svace ${svaceCmd} \ --project ${params.GIT_PROJECT} \ --branch ${branch} \ --snapshot "${commitShortSha} - `date -R`" \ --source-tree ${env.WORKSPACE}/${params.GIT_PROJECT} \ --if-no-branch clone-${mainBranch} - svacer upload --ssl \ + ${svacerCmd} upload --ssl \ --user ${VAULT_SVACER_LOGIN} \ --password ${VAULT_SVACER_PASS} \ --ldap_server ${ldapServer}