[DO-1528] fix svace and svacer pathes (!70)
Co-authored-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.tech> Reviewed-on: https://git.avroid.tech/DevOps/jenkins-pipelines/pulls/70
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user