// Add this webhook in Gitea: // http://192.168.1.37:8080/gitea-webhook/post pipeline { agent { label 'rust_no_docker' } options { disableConcurrentBuilds() } environment { CARGO_TERM_COLOR = 'always' // Reserved for future generated CI artifacts. CI_ARTIFACT_DIR = '.ci-artifacts' } stages { stage('Checkout') { steps { checkout scm } } stage('Validate Repository') { steps { sh ''' set -eu echo "Validating Reportist repository..." test -f README.md test -f LICENSE test -f AGENT.md echo "Repository structure OK." ''' } } /* * TODO: Setup Typst * * Once Reportist contains the renderer: * * - install cargo-binstall when unavailable; * - install typst-cli; * - print `typst --version`. */ stage('Validate Contract') { steps { sh ''' set -eu command -v uv >/dev/null 2>&1 || { echo "uv is required for the isolated validation environment" >&2; exit 1; } uv venv --python 3.11 --allow-existing .ci-venv uv pip sync --python .ci-venv/bin/python requirements.txt .ci-venv/bin/python --version command -v typst >/dev/null 2>&1 || { echo "Typst is required for renderer tests" >&2; exit 1; } typst --version .ci-venv/bin/python -m unittest discover -s tests -p 'test_*.py' ''' } } /* * No deployment stage is currently intended. * * Reportist is a renderer/tool, not the owner of published * Beffroi reports. */ } post { success { publishChecks( conclusion: 'SUCCESS', name: 'Reportist CI', summary: 'Reportist passed all currently implemented CI checks.', text: 'Repository and report contract tests passed. PDF renderer implementation and rendering validation remain pending.', title: 'Reportist CI passed' ) echo '✅ Reportist CI passed.' } failure { publishChecks( conclusion: 'FAILURE', name: 'Reportist CI', summary: 'Reportist failed CI.', text: 'A repository or validation check failed. Check the Jenkins log.', title: 'Reportist CI failed' ) echo '❌ Reportist CI failed.' } unstable { publishChecks( conclusion: 'ACTION_REQUIRED', name: 'Reportist CI', summary: 'Reportist CI is unstable.', text: 'The Jenkins build completed with an unstable status.', title: 'Reportist CI unstable' ) echo '⚠️ Reportist CI is unstable.' } always { echo 'CI finished.' } } }