pipeline { agent { label 'rust_no_docker' } options { disableConcurrentBuilds() skipDefaultCheckout(true) } stages { stage('Checkout') { steps { checkout scm } } stage('Validate Repository') { steps { sh ''' set -eu test -f README.md test -f LICENSE test -f Makefile test -f schemas/diagnostic.schema.json test -x tools/analyse.sh test -x tools/validate.sh command -v make >/dev/null 2>&1 command -v jq >/dev/null 2>&1 command -v uv >/dev/null 2>&1 jq --version uv --version ''' } } stage('Test') { steps { sh 'make test' } } } post { success { publishChecks( conclusion: 'SUCCESS', name: 'Win Diagnostics CI', summary: 'All diagnostic checks passed.', text: 'Contracts, evidence integrity, fixtures, rules, watchlists, and the shell/jq runtime passed.', title: 'Win Diagnostics CI passed' ) echo '✅ Win Diagnostics CI passed.' } failure { publishChecks( conclusion: 'FAILURE', name: 'Win Diagnostics CI', summary: 'A diagnostic check failed.', text: 'Review the Jenkins log for the failing contract, fixture, rule, or runtime check.', title: 'Win Diagnostics CI failed' ) echo '❌ Win Diagnostics CI failed.' } unstable { publishChecks( conclusion: 'ACTION_REQUIRED', name: 'Win Diagnostics CI', summary: 'The diagnostic build is unstable.', text: 'Review the Jenkins log for unstable checks.', title: 'Win Diagnostics CI unstable' ) echo '⚠️ Win Diagnostics CI is unstable.' } } }