generated from karsten.jeppesen/KAJE-Template
fix: .workflow/Jenkinsfile
All checks were successful
CICD-UCN/QuizSystem/pipeline/head This commit looks good
All checks were successful
CICD-UCN/QuizSystem/pipeline/head This commit looks good
This commit is contained in:
8
.workflow/Jenkinsfile
vendored
8
.workflow/Jenkinsfile
vendored
@@ -86,7 +86,7 @@ pipeline {
|
||||
}
|
||||
|
||||
stage('Scan with Ollama') {
|
||||
when { expression { fileExists('text_files.txt') && sh(script: "test -s text_files.txt", returnStatus: true) == 0 } }
|
||||
when { expression { branch 'Security' && fileExists('text_files.txt') && sh(script: "test -s text_files.txt", returnStatus: true) == 0 } }
|
||||
steps {
|
||||
sh ".workflow/scan_with_ollama.sh \"$TEXT_FILES_FILE\" \"$SCAN_JSON_FILE\" \"$OLLAMA_MODEL\" \"$MAX_FILE_BYTES\" \"$REQUEST_TIMEOUT_SEC\""
|
||||
archiveArtifacts artifacts: "$SCAN_JSON_FILE", allowEmptyArchive: true
|
||||
@@ -94,7 +94,7 @@ pipeline {
|
||||
}
|
||||
|
||||
stage('Build Markdown Report') {
|
||||
when { expression { fileExists('text_files.txt') && sh(script: "test -s text_files.txt", returnStatus: true) == 0 } }
|
||||
when { expression { branch 'Security' && fileExists('text_files.txt') && sh(script: "test -s text_files.txt", returnStatus: true) == 0 } }
|
||||
steps {
|
||||
sh ".workflow/build_markdown_report.sh \"$SCAN_JSON_FILE\" \"$REPORT_FILE\""
|
||||
archiveArtifacts artifacts: "$REPORT_FILE", allowEmptyArchive: true
|
||||
@@ -102,14 +102,14 @@ pipeline {
|
||||
}
|
||||
|
||||
stage('Report to Gitea (Issue)') {
|
||||
when { expression { fileExists('text_files.txt') && sh(script: "test -s text_files.txt", returnStatus: true) == 0 } }
|
||||
when { expression { branch 'Security' && fileExists('text_files.txt') && sh(script: "test -s text_files.txt", returnStatus: true) == 0 } }
|
||||
steps {
|
||||
sh ".workflow/create_gitea_issue.sh \"$REPORT_FILE\""
|
||||
}
|
||||
}
|
||||
|
||||
stage('Quality Gate') {
|
||||
when { expression { fileExists('text_files.txt') && sh(script: "test -s text_files.txt", returnStatus: true) == 0 } }
|
||||
when { expression { branch 'Security' && fileExists('text_files.txt') && sh(script: "test -s text_files.txt", returnStatus: true) == 0 } }
|
||||
steps {
|
||||
sh ".workflow/evaluate_threshold.sh \"$SCAN_JSON_FILE\" \"$FAIL_ON_MEDIUM_OR_HIGH\""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user