beffroi-reporting/Jenkinsfile

84 lines
2.7 KiB
Groovy

pipeline {
agent { label 'rust_no_docker' }
options {
disableConcurrentBuilds()
skipDefaultCheckout(true)
}
stages {
stage('Checkout') {
steps {
checkout([
$class: 'GitSCM',
branches: scm.branches,
extensions: [[
$class: 'SubmoduleOption',
disableSubmodules: false,
parentCredentials: true,
recursiveSubmodules: true,
reference: '',
shallow: false,
trackingSubmodules: false
]],
userRemoteConfigs: scm.userRemoteConfigs
])
}
}
stage('Validate Workspace') {
steps {
sh '''
set -eu
test -f README.md
test -f LICENSE.md
test -f Makefile
test -x bootstrap.sh
test -x scripts/check-components.sh
./bootstrap.sh --check
git submodule status --recursive
'''
}
}
stage('Test Components and Integration') {
steps {
sh 'make check'
}
}
}
post {
success {
publishChecks(
conclusion: 'SUCCESS',
name: 'Beffroi Reporting CI',
summary: 'All component and integration checks passed.',
text: 'Diagnostic analysis, immutable draft generation, contract validation, and PDF rendering passed.',
title: 'Beffroi Reporting CI passed'
)
echo '✅ Beffroi Reporting CI passed.'
}
failure {
publishChecks(
conclusion: 'FAILURE',
name: 'Beffroi Reporting CI',
summary: 'A component or integration check failed.',
text: 'Review the Jenkins log for the failing repository, contract, publication, or rendering check.',
title: 'Beffroi Reporting CI failed'
)
echo '❌ Beffroi Reporting CI failed.'
}
unstable {
publishChecks(
conclusion: 'ACTION_REQUIRED',
name: 'Beffroi Reporting CI',
summary: 'The integration build is unstable.',
text: 'Review the Jenkins log for unstable checks.',
title: 'Beffroi Reporting CI unstable'
)
echo '⚠️ Beffroi Reporting CI is unstable.'
}
}
}