From e29707deeb8fa7d62ce2cb0382874cccd99382f4 Mon Sep 17 00:00:00 2001 From: Alexa <53471801+Alexa-RR@users.noreply.github.com> Date: Sun, 25 Oct 2026 12:49:09 +0200 Subject: [PATCH] ci: keep the checkout so the path filter can skip non-client pushes The job's path filter needs the last build's checkout to compare against. The pipeline deleted the whole workspace after each run, so Jenkins polled with "Working Directory does not exist", assumed changes, and started a run for every push (builds #6 and #7: zero changed files). Delete only out/ and quest-work/ instead. --- Jenkinsfile | 13 +++++++++---- ci/jenkins/README.md | 5 ++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9a9190d..865ecfa 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -226,10 +226,15 @@ pipeline { archiveArtifacts artifacts: 'out/downloads/**', allowEmptyArchive: true, fingerprint: true } cleanup { - // Runs after archiving. Keeps the restic cache and restored stock - // builds ($DORKNET_CACHE on the agent, outside the workspace); drops - // the workspace's build output and scratch. - cleanWs(deleteDirs: true, notFailBuild: true) + // Runs after archiving. Drops the build output and scratch (several + // GB) but keeps the Git checkout: the job's path filter compares + // pushes against it, and without a workspace Jenkins treats every + // push as a change and starts a run. The restic cache and restored + // stock builds live outside the workspace ($DORKNET_CACHE). + cleanWs(deleteDirs: true, notFailBuild: true, patterns: [ + [pattern: 'out/**', type: 'INCLUDE'], + [pattern: 'quest-work/**', type: 'INCLUDE'], + ]) } } } diff --git a/ci/jenkins/README.md b/ci/jenkins/README.md index 7d27eb7..98dcd39 100644 --- a/ci/jenkins/README.md +++ b/ci/jenkins/README.md @@ -71,7 +71,10 @@ Resolve a table for another build locally with `build.py build --dump-cs`. under the job's **Git** source, add **Additional Behaviours → Polling ignores commits in certain paths** with included regions `DorkNet[.]ClientMod/.*`, `DorkNet[.]Quest/.*`, `tools/build_pc[.]py` (one - per line) and excluded region `.*[.]md`. + per line) and excluded region `.*[.]md`. The filter compares against the + last build's checkout, so the pipeline keeps it and deletes only `out/` + and its scratch folders after each run; without a checkout, Jenkins treats + every push as a change. - **Build with Parameters** runs a manual build: - `PLATFORMS` (both / pc / quest), and `PC_FULL_CLIENT` for the full PC client; - snapshot tags, and per-run repository overrides;