From 720f60bb0a1eb9112b735bd069359c26e51e7218 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Tue, 15 Sep 2026 15:28:11 +0200 Subject: [PATCH] All Jenkinsfile --- Jenkinsfile | 212 ++++++++++++++++++++++++++++++++++++++++++++++++ beffroi-reports | 2 +- reportist | 2 +- win-diagnostics | 2 +- 4 files changed, 215 insertions(+), 3 deletions(-) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..a0fb6dc --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,212 @@ +// 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' + + CI_ARTIFACT_DIR = '.ci-artifacts' + + // Reserved for future report publication. + // DEPLOY_DIR = '/mnt/books/Reports' + + // Reserved for future generated diagnostic/report metadata. + // DIAGNOSTICS_AUTHOR = 'Beffroi' + } + + stages { + stage('Checkout') { + steps { + checkout scm + + sh ''' + set -eu + + echo "Synchronizing Beffroi Reporting workspace..." + + git submodule sync --recursive + git submodule update --init --recursive + ''' + } + } + + stage('Validate Workspace') { + steps { + sh ''' + set -eu + + echo "Validating macro repository..." + + test -f README.md + test -f LICENSE + test -f LICENSE-DATA.md + test -f AGENT.md + test -f AGENTS-TASKS.md + test -f .gitmodules + + echo + echo "Submodules:" + git submodule status --recursive + + echo + echo "Workspace structure OK." + ''' + } + } + + stage('Validate Components') { + steps { + sh ''' + set -eu + + echo "Checking component repositories..." + + test -d diagnostics/.git || test -f diagnostics/.git + test -d reports/.git || test -f reports/.git + test -d reporter/.git || test -f reporter/.git + + test -f diagnostics/README.md + test -f reports/README.md + test -f reporter/README.md + + echo "Component repositories OK." + ''' + } + } + + /* + * Legacy references + * ----------------- + * + * During migration, references/WinDiagnostics and + * references/typst_reporter may also be submodules. + * + * They are migration references and should NOT become runtime + * dependencies of the final architecture. + * + * We therefore intentionally do not require them here forever. + */ + + /* + * TODO: Component CI + * + * Once component-level validation commands exist, invoke them + * here rather than duplicating their implementation. + * + * For example: + * + * diagnostics/... validate + * reporter/... validate + * reports/... validate + */ + + /* + * TODO: Integration Test + * + * Eventually validate the complete sanitized pipeline: + * + * diagnostic fixture + * ↓ + * win-diagnostics + * ↓ + * diagnostic.json + * ↓ + * beffroi-reports adapter + * ↓ + * report.yaml + * ↓ + * reportist + * ↓ + * report.pdf + */ + + /* + * TODO: Setup Typst + * + * Install through cargo-binstall as in the legacy reporting CI + * once integration rendering exists. + */ + + /* + * TODO: Setup Packaging + * + * The previous reporting project used: + * + * uv venv --allow-existing .ci-venv + * uv pip install ... + * + * Do not migrate this until packaging is actually needed. + */ + + /* + * TODO: Render Reports + * + * Rendering should use Reportist against report definitions owned + * by beffroi-reports. + */ + + /* + * TODO: Package Reports + * + * If encrypted report archives remain useful, migrate the existing + * pyzipper-based packaging here after the new pipeline works. + */ + + /* + * TODO: Publish Reports + * + * Potential future destination: + * + * /mnt/books/Reports + * + * Do not enable publication until generated output has been + * manually compared with the existing production reports. + */ + } + + post { + success { + publishChecks( + conclusion: 'SUCCESS', + name: 'Beffroi Reporting CI', + summary: 'Beffroi Reporting workspace passed all currently implemented CI checks.', + text: 'The macro repository and its component submodules were checked out and validated successfully.', + title: 'Reporting workspace healthy' + ) + + echo '✅ Beffroi Reporting workspace is healthy.' + } + + failure { + publishChecks( + conclusion: 'FAILURE', + name: 'Beffroi Reporting CI', + summary: 'Beffroi Reporting integration CI failed.', + text: 'Workspace checkout, submodule initialization, or validation failed. Check the Jenkins log.', + title: 'Reporting workspace failed' + ) + + echo '❌ Beffroi Reporting integration CI failed.' + } + + unstable { + publishChecks( + conclusion: 'ACTION_REQUIRED', + name: 'Beffroi Reporting CI', + summary: 'Beffroi Reporting integration CI is unstable.', + text: 'The Jenkins build completed with an unstable status.', + title: 'Reporting workspace unstable' + ) + + echo '⚠️ Beffroi Reporting integration CI is unstable.' + } + + always { + echo 'CI finished.' + } + } +} diff --git a/beffroi-reports b/beffroi-reports index 1db7917..a14d627 160000 --- a/beffroi-reports +++ b/beffroi-reports @@ -1 +1 @@ -Subproject commit 1db79172785f4455773c0eb69640cebc4488583f +Subproject commit a14d627b0dd6a818bf044c86cc7f8d5bdc23331f diff --git a/reportist b/reportist index d33bb4a..de764c1 160000 --- a/reportist +++ b/reportist @@ -1 +1 @@ -Subproject commit d33bb4a16fccec5b280802972933992c6490a1f0 +Subproject commit de764c1961dcaf6a036cc6f602d0fc695a7d83ec diff --git a/win-diagnostics b/win-diagnostics index 84736d0..f019b33 160000 --- a/win-diagnostics +++ b/win-diagnostics @@ -1 +1 @@ -Subproject commit 84736d004e89f39d0b02ba7b9bf4d60022546329 +Subproject commit f019b33a4e40ad76589b1b9f7eff2f327953d894