Files
khaotic-engine-Reborn/Jenkinsfile
2025-10-08 16:29:03 +02:00

99 lines
3.2 KiB
Groovy

pipeline {
agent { label 'windows' }
options {
timestamps()
disableConcurrentBuilds()
timeout(time: 30, unit: 'MINUTES')
}
triggers {
pollSCM('')
}
stages {
stage('Checkout') {
steps {
echo 'Checking out code...'
checkout scm
}
}
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') {
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'
archiveArtifacts artifacts: 'builds/*.zip', fingerprint: true
}
}
}
post {
always {
echo 'Build completed!'
}
success {
echo 'Build successful! 🎉'
}
failure {
echo 'Build failed! ❌'
}
cleanup {
cleanWs(deleteDirs: true, disableDeferredWipeout: true, notFailBuild: true)
}
}
}