From a871f87775f9e059d65440fdb7214e5b73246178 Mon Sep 17 00:00:00 2001 From: twi-devel Date: Thu, 22 Oct 2026 18:18:25 +0200 Subject: [PATCH] Add workspace cleanup stage to prevent corruption issues - Add Cleanup stage at pipeline start to wipe workspace before checkout - Prevents 'corrupt .git repository' errors from stale build artifacts - Uses disableDeferredWipeout for thorough cleanup Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Entire-Checkpoint: f6767c4eba2c Signed-off-by: twi-devel --- Jenkinsfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 644496f..e8c3be8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -23,6 +23,15 @@ pipeline { } stages { + stage('Cleanup') { + steps { + script { + echo "Cleaning workspace to avoid corruption issues..." + cleanWs deleteDirs: true, disableDeferredWipeout: true + } + } + } + stage('Checkout') { steps { checkout scm