transitive
CICD-UCN/QuizSystem/pipeline/head This commit looks good

This commit is contained in:
Karsten Jeppesen
2026-11-25 08:48:46 +01:00
parent 05b674ecbf
commit a7ca85a772
4 changed files with 27 additions and 6 deletions
+12 -4
View File
@@ -97,7 +97,9 @@ pipeline {
}
stage('Scan with Ollama') {
when { expression { branch 'Security' && fileExists('text_files.txt') && sh(script: "test -s text_files.txt", returnStatus: true) == 0 } }
when {
branch 'Security'
}
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
@@ -105,7 +107,9 @@ pipeline {
}
stage('Build Markdown Report') {
when { expression { branch 'Security' && fileExists('text_files.txt') && sh(script: "test -s text_files.txt", returnStatus: true) == 0 } }
when {
branch 'Security'
}
steps {
sh ".workflow/build_markdown_report.sh \"$SCAN_JSON_FILE\" \"$REPORT_FILE\""
archiveArtifacts artifacts: "$REPORT_FILE", allowEmptyArchive: true
@@ -113,14 +117,18 @@ pipeline {
}
stage('Report to Gitea (Issue)') {
when { expression { branch 'Security' && fileExists('text_files.txt') && sh(script: "test -s text_files.txt", returnStatus: true) == 0 } }
when {
branch 'Security'
}
steps {
sh ".workflow/create_gitea_issue.sh \"$REPORT_FILE\""
}
}
stage('Quality Gate') {
when { expression { branch 'Security' && fileExists('text_files.txt') && sh(script: "test -s text_files.txt", returnStatus: true) == 0 } }
when {
branch 'Security'
}
steps {
sh ".workflow/evaluate_threshold.sh \"$SCAN_JSON_FILE\" \"$FAIL_ON_MEDIUM_OR_HIGH\""
}