Files
khaotic-engine-Reborn/Jenkinsfile
CatChow0 9515b18d1e Patch - Packages builds and updates archiving - V14.5.3
Packages debug and release builds into ZIP archives.

Updates artifact archiving to include only the ZIP packages,
rather than individual executables and DLLs. This simplifies
the artifact management process and reduces storage space.
2025-10-08 15:01:52 +02:00

91 lines
2.8 KiB
Groovy

pipeline {
agent { label 'windows' }
options {
timestamps()
disableConcurrentBuilds()
timeout(time: 30, unit: 'MINUTES')
}
triggers {
// Poll SCM sans schedule - activé uniquement par webhook
pollSCM('')
}
stages {
stage('Checkout') {
steps {
echo 'Checking out code...'
checkout scm
}
}
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"
"""
}
}
stage('Archive Artifacts') {
steps {
echo 'Archiving ZIP packages'
archiveArtifacts artifacts: 'builds/*.zip', fingerprint: true
}
}
}
post {
always {
echo 'Build completed!'
}
success {
echo 'Build successful! 🎉'
}
failure {
echo 'Build failed! ❌'
}
cleanup {
// Nettoie le workspace mais garde les artifacts
cleanWs(deleteDirs: true, disableDeferredWipeout: true, notFailBuild: true)
}
}
}