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;