From c34bb8229ef5100bb6206caa4c518899c3dc28c2 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Sat, 5 Jul 2025 17:25:49 +0200 Subject: [PATCH] Update Jenkinsfile --- Jenkinsfile | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7d58211..05066a8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -28,31 +28,50 @@ pipeline { } } - /* =============== - END USER CONFIG - ================== */ - stage('Build Book') { steps { sh 'mdbook build' } } + stage('Scan Warnings') { + steps { + // warnError('Scanning warnings') { + // withChecks('Parsing: ', includeStage: true) { + recordIssues tools: [ + groovyScript('mdbook_preprocessor_import') + ], + qualityGates: [ + [threshold: 1, type: 'TOTAL', unstable: true, criticality: 'UNSTABLE'], + [threshold: 1, type: 'TOTAL_ERROR', unstable: true, criticality: 'UNSTABLE'] + ] + // } + } + } + stage('Deploy to Books') { steps { sh 'echo "Deploying to ${DEPLOY_DIR}"' + // This would be the nuclear approach sh 'mkdir -p ${DEPLOY_DIR}' - sh 'rsync -a --delete ${MDBOOK_BUILD_DIR}/ ${DEPLOY_DIR}' + // sh 'rm -rf ${DEPLOY_DIR}/*' + // sh 'cp -r ${MDBOOK_BUILD_DIR}/* ${DEPLOY_DIR}/' + sh 'rsync -a --delete "${MDBOOK_BUILD_DIR}/" "${DEPLOY_DIR}"' } } } post { success { - echo '✅ mdBook Built!' + publishChecks conclusion: 'SUCCESS', name: 'Build Successful', summary: 'The build was successful', text: 'The build was sucessful', title: 'Build Successful' + echo '✅mdBook Built!' } failure { - echo '❌ mdbook Failed to Build' + publishChecks conclusion: 'FAILURE', name: 'Build Failed', summary: 'The build failed', text: 'The build was a failure', title: 'Build failed' + echo '❌mdbook Failed to Build' + } + unstable{ + publishChecks conclusion: 'ACTION_REQUIRED', name: 'Build Unstable', summary: 'Unstable do to plugins missing', text: 'Unstable do to plugins missing', title: 'Build Unstable' } } }