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