Skip to content

Commit

Permalink
feat(jenkins): Allow to configure the list of advisors
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
  • Loading branch information
sschuberth committed Sep 9, 2024
1 parent c21b31b commit af559df
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions integrations/jenkins/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,16 @@ pipeline {

booleanParam(
name: 'RUN_ADVISOR',
description: 'Run the advisor tool. Both the OSV and VulnerableCode providers will be used by default.',
description: 'Run the advisor tool.',
defaultValue: true
)

string(
name: 'ADVISORS',
description: 'A comma-separated list of advisors to use.',
defaultValue: 'OSV,VulnerableCode'
)

/*
* ORT evaluator tool parameters.
*/
Expand Down Expand Up @@ -777,7 +783,9 @@ pipeline {
ORT_OPTIONS="$ORT_OPTIONS --stacktrace"
fi
ADVISOR_OPTIONS="-a OSV,VulnerableCode"
if [ -n "$ADVISORS" ]; then
ADVISOR_OPTIONS="-a $ADVISORS"
fi
rm -fr out/results/advisor
/opt/ort/bin/ort $ORT_OPTIONS advise $ADVISOR_OPTIONS -i out/results/current-result.yml -o out/results/advisor
Expand Down

0 comments on commit af559df

Please sign in to comment.