From 6696ec9ca1ed7881b3697119c767552010962ee5 Mon Sep 17 00:00:00 2001 From: RebeccaNod1 Date: Thu, 14 Aug 2025 00:46:59 -0500 Subject: [PATCH] Move cleanup stage to run immediately after checkout - Cleanup now runs right after checkout, before validation - Removes conditional 'when' clause so cleanup runs on all branches - This ensures validation only processes clean original files - Much more efficient - no more validating hundreds of processed files --- Jenkinsfile | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index da300e1..9c1fa78 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,6 +20,17 @@ pipeline { } } + stage('Clean Workspace') { + steps { + echo "🧹 Cleaning up processed files from previous builds..." + sh ''' + # Remove any processed files from previous builds + rm -f processed_*.lsl + echo "Workspace cleaned of processed files" + ''' + } + } + stage('LSL Validation') { steps { echo "🔧 Validating LSL syntax..." @@ -37,25 +48,6 @@ pipeline { } } - stage('Clean Workspace') { - when { - anyOf { - environment name: 'GIT_BRANCH', value: 'origin/main' - environment name: 'GIT_BRANCH', value: 'origin/develop' - environment name: 'GIT_BRANCH', value: 'main' - environment name: 'GIT_BRANCH', value: 'develop' - } - } - steps { - echo "🧹 Cleaning up processed files from previous builds..." - sh ''' - # Remove any processed files from previous builds - rm -f processed_*.lsl - echo "Workspace cleaned of processed files" - ''' - } - } - stage('Preprocess Scripts') { when { anyOf {