79 lines
2.2 KiB
Groovy
79 lines
2.2 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('Archive Artifacts') {
|
|
steps {
|
|
echo 'Archiving build artifacts...'
|
|
|
|
// Archive les exécutables et DLL générés
|
|
archiveArtifacts artifacts: '**/Debug/**/*.exe, **/Release/**/*.exe, **/Debug/**/*.dll, **/Release/**/*.dll',
|
|
allowEmptyArchive: true,
|
|
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)
|
|
}
|
|
}
|
|
}
|