Update Jenkinsfile
This commit is contained in:
parent
27a6315a0c
commit
c335b4345b
|
|
@ -48,39 +48,44 @@ pipeline {
|
||||||
|
|
||||||
stage('Scan Warnings') {
|
stage('Scan Warnings') {
|
||||||
steps {
|
steps {
|
||||||
recordIssues tools: [
|
// warnError('Scanning warnings') {
|
||||||
groovyScript('mdbook_preprocessor_import')
|
// withChecks('Parsing: ', includeStage: true) {
|
||||||
],
|
recordIssues tools: [
|
||||||
qualityGates: [
|
groovyScript('mdbook_preprocessor_import')
|
||||||
[threshold: 1, type: 'TOTAL', unstable: true],
|
],
|
||||||
[threshold: 1, type: 'TOTAL_ERROR', unstable: false]
|
qualityGates: [
|
||||||
]
|
[threshold: 1, type: 'TOTAL', unstable: true, criticality: 'UNSTABLE'],
|
||||||
|
[threshold: 1, type: 'TOTAL_ERROR', unstable: true, criticality: 'UNSTABLE']
|
||||||
|
]
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Deploy to Books') {
|
stage('Deploy to Books') {
|
||||||
steps {
|
steps {
|
||||||
sh 'echo "Deploying to ${DEPLOY_DIR}"'
|
sh 'echo "Deploying to ${DEPLOY_DIR}"'
|
||||||
|
// This would be the nuclear approach
|
||||||
sh 'mkdir -p ${DEPLOY_DIR}'
|
sh 'mkdir -p ${DEPLOY_DIR}'
|
||||||
// sh 'rm -rf ${DEPLOY_DIR}/*' // This would be the nuclear approach
|
// sh 'rm -rf ${DEPLOY_DIR}/*'
|
||||||
// sh 'cp -r ${MDBOOK_BUILD_DIR}/* ${DEPLOY_DIR}/' // Instead a rsync seems more sensible
|
// sh 'cp -r ${MDBOOK_BUILD_DIR}/* ${DEPLOY_DIR}/'
|
||||||
sh 'rsync -a --delete ${MDBOOK_BUILD_DIR}/ ${DEPLOY_DIR}/'
|
sh 'rsync -a --delete "${MDBOOK_BUILD_DIR}/" "${DEPLOY_DIR}"'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
post {
|
post {
|
||||||
success {
|
success {
|
||||||
echo '✅ mdBook Built!'
|
publishChecks conclusion: 'SUCCESS', name: 'Build Successful', summary: 'The build was successful', text: 'The build was sucessful', title: 'Build Successful'
|
||||||
// publishChecks name: 'example', title: 'Pipeline Check', summary: 'check through pipeline',
|
echo '✅mdBook Built!'
|
||||||
// text: 'you can publish checks in pipeline script',
|
|
||||||
// detailsURL: 'https://github.com/jenkinsci/checks-api-plugin#pipeline-usage',
|
|
||||||
// actions: [[label:'an-user-request-action', description:'actions allow users to request pre-defined behaviours', identifier:'an unique identifier']]
|
|
||||||
|
|
||||||
}
|
}
|
||||||
failure {
|
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 due to plugins missing', text: 'Unstable due to plugins missing', title: 'Build Unstable'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue