From de764c1961dcaf6a036cc6f602d0fc695a7d83ec Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Tue, 15 Sep 2026 15:26:59 +0200 Subject: [PATCH] Jenkinsfile --- Jenkinsfile | 125 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..022df68 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,125 @@ +// 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`. + */ + + /* + * TODO: Validate Report Schema + * + * Once schema/report.schema.json exists: + * + * - validate the schema itself; + * - validate examples/*.yaml; + * - reject malformed report definitions. + */ + + /* + * TODO: Render Example + * + * Once the renderer exists: + * + * reportist examples/example-report.yaml + * + * or the equivalent render.sh invocation. + */ + + /* + * TODO: Regression Tests + * + * Render synthetic fixtures and verify that all supported + * report constructs compile successfully. + */ + + /* + * 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 validation completed successfully. Renderer validation will be enabled as functionality is migrated.', + 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.' + } + } +}