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
This commit is contained in:
parent
9c73a60f89
commit
6696ec9ca1
1 changed files with 11 additions and 19 deletions
30
Jenkinsfile
vendored
30
Jenkinsfile
vendored
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue