Patch - Refactors build and package stages for parallelism - V14.5.5

Improves build and package processes by introducing parallel execution for debug and release configurations.

This change reduces overall execution time by building and packaging debug and release versions concurrently.
This commit is contained in:
2025-10-08 16:17:15 +02:00
parent 0368276fbf
commit 467b357620

22
Jenkinsfile vendored
View File

@@ -8,7 +8,6 @@ pipeline {
} }
triggers { triggers {
// Poll SCM sans schedule - activé uniquement par webhook
pollSCM('') pollSCM('')
} }
@@ -20,6 +19,8 @@ pipeline {
} }
} }
stage('Build') {
parallel {
stage('Build Debug') { stage('Build Debug') {
steps { steps {
echo 'Building Debug...' echo 'Building Debug...'
@@ -33,7 +34,6 @@ pipeline {
""" """
} }
} }
stage('Build Release') { stage('Build Release') {
steps { steps {
echo 'Building Release...' echo 'Building Release...'
@@ -47,22 +47,31 @@ pipeline {
""" """
} }
} }
}
}
stage('Package') { stage('Package') {
parallel {
stage('Package Debug') {
steps { steps {
echo 'Packaging Debug and Release builds into ZIPs' echo 'Packaging Debug build into ZIP'
// Crée un dossier builds
bat 'if not exist "%WORKSPACE%\\builds" mkdir "%WORKSPACE%\\builds"' bat 'if not exist "%WORKSPACE%\\builds" mkdir "%WORKSPACE%\\builds"'
// Compresse Debug
bat """ bat """
powershell -Command "Compress-Archive -Path '%WORKSPACE%\\**\\Debug\\*' -DestinationPath '%WORKSPACE%\\builds\\KhaoticEngineReborn_Debug.zip' -Force" powershell -Command "Compress-Archive -Path '%WORKSPACE%\\**\\Debug\\*' -DestinationPath '%WORKSPACE%\\builds\\KhaoticEngineReborn_Debug.zip' -Force"
""" """
// Compresse Release }
}
stage('Package Release') {
steps {
echo 'Packaging Release build into ZIP'
bat 'if not exist "%WORKSPACE%\\builds" mkdir "%WORKSPACE%\\builds"'
bat """ bat """
powershell -Command "Compress-Archive -Path '%WORKSPACE%\\**\\Release\\*' -DestinationPath '%WORKSPACE%\\builds\\KhaoticEngineReborn_Release.zip' -Force" powershell -Command "Compress-Archive -Path '%WORKSPACE%\\**\\Release\\*' -DestinationPath '%WORKSPACE%\\builds\\KhaoticEngineReborn_Release.zip' -Force"
""" """
} }
} }
}
}
stage('Archive Artifacts') { stage('Archive Artifacts') {
steps { steps {
@@ -83,7 +92,6 @@ pipeline {
echo 'Build failed! ❌' echo 'Build failed! ❌'
} }
cleanup { cleanup {
// Nettoie le workspace mais garde les artifacts
cleanWs(deleteDirs: true, disableDeferredWipeout: true, notFailBuild: true) cleanWs(deleteDirs: true, disableDeferredWipeout: true, notFailBuild: true)
} }
} }