diff --git a/Jenkinsfile b/Jenkinsfile index 6c90a9e..a313078 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -8,7 +8,6 @@ pipeline { } triggers { - // Poll SCM sans schedule - activé uniquement par webhook pollSCM('') } @@ -20,50 +19,60 @@ 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" + """ + } + } } } - + stage('Archive Artifacts') { steps { echo 'Archiving ZIP packages' @@ -83,7 +92,6 @@ pipeline { echo 'Build failed! ❌' } cleanup { - // Nettoie le workspace mais garde les artifacts cleanWs(deleteDirs: true, disableDeferredWipeout: true, notFailBuild: true) } }