mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-22 09:22:18 -05:00
Commit Jenkinsfile to develop
This commit is contained in:
parent
86869085cd
commit
5b52e7e570
99
Jenkinsfile
vendored
Normal file
99
Jenkinsfile
vendored
Normal file
@ -0,0 +1,99 @@
|
||||
pipeline {
|
||||
|
||||
environment {
|
||||
MSBUILD='C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\Msbuild\\Current\\Bin\\msbuild.exe'
|
||||
CONFIG='Release'
|
||||
OTRPLATFORM='x64'
|
||||
PLATFORM='x86'
|
||||
ZIP='C:\\Program Files\\7-Zip\\7z.exe'
|
||||
PYTHON='C:\\Users\\jenkins\\AppData\\Local\\Programs\\Python\\Python310\\python.exe'
|
||||
TOOLSET='v142'
|
||||
EMAILTO=''
|
||||
}
|
||||
|
||||
agent {
|
||||
label 'SoH-Builders'
|
||||
}
|
||||
|
||||
options {
|
||||
timestamps()
|
||||
timeout(time: 15, unit: 'MINUTES')
|
||||
skipDefaultCheckout(true)
|
||||
}
|
||||
|
||||
stages {
|
||||
|
||||
stage ('Checkout') {
|
||||
steps {
|
||||
checkout([
|
||||
$class: 'GitSCM',
|
||||
branches: scm.branches,
|
||||
doGenerateSubmoduleConfigurations: scm.doGenerateSubmoduleConfigurations,
|
||||
extensions: scm.extensions,
|
||||
userRemoteConfigs: scm.userRemoteConfigs
|
||||
])
|
||||
}
|
||||
}
|
||||
|
||||
stage ('Build OTRExporter') {
|
||||
steps {
|
||||
bat """
|
||||
|
||||
"${env.MSBUILD}" ".\\OTRExporter\\OTRExporter.sln" -t:restore,build -p:Configuration=${env.CONFIG};Platform=${env.OTRPLATFORM};PlatformToolset=${env.TOOLSET};RestorePackagesConfig=true /nodeReuse:false
|
||||
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
stage ('Extract assets') {
|
||||
steps {
|
||||
bat """
|
||||
|
||||
xcopy "..\\..\\ZELOOTD.z64" "OTRExporter\\"
|
||||
|
||||
cd "OTRExporter"
|
||||
"${env.PYTHON}" ".\\extract_assets.py"
|
||||
cd "${env.WORKSPACE}"
|
||||
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
stage ('Build SoH') {
|
||||
steps {
|
||||
bat """
|
||||
|
||||
"${env.MSBUILD}" ".\\soh\\soh.sln" -t:build -p:Configuration=${env.CONFIG};Platform=${env.PLATFORM};PlatformToolset=${env.TOOLSET} /nodeReuse:false
|
||||
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
stage ('Archive artifacts') {
|
||||
steps {
|
||||
bat """
|
||||
|
||||
"${env.ZIP}" a "soh.zip" ".\\soh\\Release\\soh.exe"
|
||||
|
||||
"""
|
||||
|
||||
archiveArtifacts allowEmptyArchive: false,
|
||||
artifacts: 'soh.zip',
|
||||
caseSensitive: true,
|
||||
defaultExcludes: true,
|
||||
fingerprint: false,
|
||||
onlyIfSuccessful: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
post {
|
||||
always {
|
||||
step([$class: 'Mailer',
|
||||
notifyEveryUnstableBuild: true,
|
||||
recipients: "${env.EMAILTO}",
|
||||
sendToIndividuals: false])
|
||||
step([$class: 'WsCleanup']) // Clean workspace
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user