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:
86
Jenkinsfile
vendored
86
Jenkinsfile
vendored
@@ -8,7 +8,6 @@ pipeline {
|
||||
}
|
||||
|
||||
triggers {
|
||||
// Poll SCM sans schedule - activé uniquement par webhook
|
||||
pollSCM('')
|
||||
}
|
||||
|
||||
@@ -20,47 +19,57 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build Debug') {
|
||||
steps {
|
||||
echo 'Building Debug...'
|
||||
bat """
|
||||
"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe" ^
|
||||
"%WORKSPACE%\\KhaoticEngineReborn.sln" ^
|
||||
/p:Configuration=Debug ^
|
||||
/p:Platform=x64 ^
|
||||
/m ^
|
||||
/verbosity:minimal
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
stage('Build Release') {
|
||||
steps {
|
||||
echo 'Building Release...'
|
||||
bat """
|
||||
"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe" ^
|
||||
"%WORKSPACE%\\KhaoticEngineReborn.sln" ^
|
||||
/p:Configuration=Release ^
|
||||
/p:Platform=x64 ^
|
||||
/m ^
|
||||
/verbosity:minimal
|
||||
"""
|
||||
stage('Build') {
|
||||
parallel {
|
||||
stage('Build Debug') {
|
||||
steps {
|
||||
echo 'Building Debug...'
|
||||
bat """
|
||||
"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe" ^
|
||||
"%WORKSPACE%\\KhaoticEngineReborn.sln" ^
|
||||
/p:Configuration=Debug ^
|
||||
/p:Platform=x64 ^
|
||||
/m ^
|
||||
/verbosity:minimal
|
||||
"""
|
||||
}
|
||||
}
|
||||
stage('Build Release') {
|
||||
steps {
|
||||
echo 'Building Release...'
|
||||
bat """
|
||||
"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe" ^
|
||||
"%WORKSPACE%\\KhaoticEngineReborn.sln" ^
|
||||
/p:Configuration=Release ^
|
||||
/p:Platform=x64 ^
|
||||
/m ^
|
||||
/verbosity:minimal
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
stage('Package') {
|
||||
steps {
|
||||
echo 'Packaging Debug and Release builds into ZIPs'
|
||||
// Crée un dossier builds
|
||||
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
|
||||
bat """
|
||||
powershell -Command "Compress-Archive -Path '%WORKSPACE%\\**\\Release\\*' -DestinationPath '%WORKSPACE%\\builds\\KhaoticEngineReborn_Release.zip' -Force"
|
||||
"""
|
||||
parallel {
|
||||
stage('Package Debug') {
|
||||
steps {
|
||||
echo 'Packaging Debug build into ZIP'
|
||||
bat 'if not exist "%WORKSPACE%\\builds" mkdir "%WORKSPACE%\\builds"'
|
||||
bat """
|
||||
powershell -Command "Compress-Archive -Path '%WORKSPACE%\\**\\Debug\\*' -DestinationPath '%WORKSPACE%\\builds\\KhaoticEngineReborn_Debug.zip' -Force"
|
||||
"""
|
||||
}
|
||||
}
|
||||
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"
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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