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 <torsten.wierschin@life-maps.com>
This commit is contained in:
torstenandCopilot committed 2026-10-22 18:42:43 +02:00
1 parent fa3a27c123
commit a871f87775
1 file changed
+9
Vendored
+9
View File
@@ -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