diff --git a/integrations/jenkins/Jenkinsfile b/integrations/jenkins/Jenkinsfile index e05f0dd910f31..8c613bbaa2656 100644 --- a/integrations/jenkins/Jenkinsfile +++ b/integrations/jenkins/Jenkinsfile @@ -402,12 +402,12 @@ pipeline { VCS_REVISION_OPTION="--vcs-revision $PROJECT_VCS_REVISION" fi - echo "default login $LOGIN password $PASSWORD" > $HOME/.netrc + echo "default login $LOGIN password $PASSWORD" > "$HOME/.netrc" rm -fr "$PROJECT_DIR" /opt/ort/bin/ort $ORT_OPTIONS download --project-url $PROJECT_VCS_URL $VCS_REVISION_OPTION -o "$PROJECT_DIR/source" - rm -f $HOME/.netrc + rm -f "$HOME/.netrc" '''.stripIndent().trim() } } @@ -449,12 +449,12 @@ pipeline { VCS_REVISION_OPTION="--vcs-revision $ORT_CONFIG_VCS_REVISION" fi - echo "default login $LOGIN password $PASSWORD" > $HOME/.netrc + echo "default login $LOGIN password $PASSWORD" > "$HOME/.netrc" - rm -fr $ORT_DATA_DIR/config - /opt/ort/bin/ort $ORT_OPTIONS download --project-url $ORT_CONFIG_VCS_URL $VCS_REVISION_OPTION -o $ORT_DATA_DIR/config + rm -fr "$ORT_DATA_DIR/config" + /opt/ort/bin/ort $ORT_OPTIONS download --project-url $ORT_CONFIG_VCS_URL $VCS_REVISION_OPTION -o "$ORT_DATA_DIR/config" - rm -f $HOME/.netrc + rm -f "$HOME/.netrc" '''.stripIndent().trim() } @@ -467,7 +467,7 @@ pipeline { echo "Not creating '$ORT_CONFIG_DIR/config.yml' as it already exists." else echo "Creating '$ORT_CONFIG_DIR/config.yml' template for job parameters." - cat >$ORT_CONFIG_DIR/config.yml <"$ORT_CONFIG_DIR/config.yml" < $HOME/.netrc + echo "default login $LOGIN password $PASSWORD" > "$HOME/.netrc" + rm -fr out/results/scanner /opt/ort/bin/ort $ORT_OPTIONS scan \ -i out/results/current-result.yml \ -o out/results/scanner \ @@ -697,7 +698,7 @@ pipeline { $PROJECT_SCANNERS_OPTION \ $SCANNERS_OPTION - rm -f $HOME/.netrc + rm -f "$HOME/.netrc" fi '''.stripIndent().trim() @@ -778,6 +779,7 @@ pipeline { ADVISOR_OPTIONS="-a OSV,VulnerableCode" + rm -fr out/results/advisor /opt/ort/bin/ort $ORT_OPTIONS advise $ADVISOR_OPTIONS -i out/results/current-result.yml -o out/results/advisor '''.stripIndent().trim() @@ -848,6 +850,7 @@ pipeline { RULES_OPTIONS="$RULES_OPTIONS --rules-file $ORT_CONFIG_DIR/evaluator.rules.kts" fi + rm -fr out/results/evaluator /opt/ort/bin/ort $ORT_OPTIONS evaluate -i out/results/current-result.yml $RULES_OPTIONS -o out/results/evaluator '''.stripIndent().trim() @@ -914,6 +917,7 @@ pipeline { REPORT_FORMATS_OPTIONS_OPTION="-O $REPORT_FORMATS_OPTIONS" fi + rm -fr out/results/reporter /opt/ort/bin/ort $ORT_OPTIONS report \ -i out/results/current-result.yml \ -o out/results/reporter \