Changeset View
Changeset View
Standalone View
Standalone View
build/jenkins/pipelines/macos-all-bundles.Jenkinsfile
Show All 24 Lines | pipeline { | ||||
parameters { | parameters { | ||||
string(name: 'BUNDLE_VERSION', defaultValue: '0.0.24dev', description: 'Bundle Version') | string(name: 'BUNDLE_VERSION', defaultValue: '0.0.24dev', description: 'Bundle Version') | ||||
string(name: 'SVN_REV', defaultValue: 'HEAD', description: 'For instance 21000') | string(name: 'SVN_REV', defaultValue: 'HEAD', description: 'For instance 21000') | ||||
booleanParam(name: 'ONLY_MOD', defaultValue: true, description: 'Only archive the mod mod.') | booleanParam(name: 'ONLY_MOD', defaultValue: true, description: 'Only archive the mod mod.') | ||||
} | } | ||||
stages { | stages { | ||||
stage("Checkout") { | stage ("Checkout") { | ||||
options { | |||||
retry(3) | |||||
} | |||||
steps { | steps { | ||||
script { | |||||
try { | |||||
svn "https://svn.wildfiregames.com/public/ps/trunk@${params.SVN_REV}" | svn "https://svn.wildfiregames.com/public/ps/trunk@${params.SVN_REV}" | ||||
} catch(e) { | |||||
sh "svn cleanup" | |||||
sleep 300 | |||||
throw e | |||||
} | |||||
} | |||||
sh "svn cleanup" | sh "svn cleanup" | ||||
sh "svn revert . -R" | sh "svn revert . -R" | ||||
sh "svn st --no-ignore | cut -c 9- | xargs rm -rfv" | sh "svn st --no-ignore | cut -c 9- | xargs rm -rfv" | ||||
} | } | ||||
} | } | ||||
stage("Compile Mac Executable") { | stage("Compile Mac Executable") { | ||||
steps { | steps { | ||||
sh "source/tools/dist/build-osx-executable.sh" | sh "source/tools/dist/build-osx-executable.sh" | ||||
Show All 10 Lines | stage("Create Mac Bundle") { | ||||
} | } | ||||
} | } | ||||
stage("Create Windows installer & *nix files") { | stage("Create Windows installer & *nix files") { | ||||
steps { | steps { | ||||
// The files created by the mac compilation need to be deleted | // The files created by the mac compilation need to be deleted | ||||
sh "svn st binaries/ --no-ignore | cut -c 9- | xargs rm -rf" | sh "svn st binaries/ --no-ignore | cut -c 9- | xargs rm -rf" | ||||
sh "svn st build/ --no-ignore | cut -c 9- | xargs rm -rf" | sh "svn st build/ --no-ignore | cut -c 9- | xargs rm -rf" | ||||
sh "svn st libraries/ --no-ignore | cut -c 9- | xargs rm -rf" | sh "svn st libraries/ --no-ignore | cut -c 9- | xargs rm -rf" | ||||
// The generated tests use hardcoded paths so they must be deleted as well. | |||||
sh 'python3 -c \"import glob; print(\\\" \\\".join(glob.glob(\\\"source/**/tests/**.cpp\\\", recursive=True)));\" | xargs rm -v' | |||||
sh "svn revert build/ -R" | sh "svn revert build/ -R" | ||||
// Then run the core object. | // Then run the core object. | ||||
sh "BUNDLE_VERSION=${BUNDLE_VERSION} source/tools/dist/build-unix-win32.sh" | sh "BUNDLE_VERSION=${BUNDLE_VERSION} source/tools/dist/build-unix-win32.sh" | ||||
} | } | ||||
} | } | ||||
} | } | ||||
post { | post { | ||||
success { | success { | ||||
archiveArtifacts '*.dmg,*.exe,*.tar.gz,*.tar.xz' | archiveArtifacts '*.dmg,*.exe,*.tar.gz,*.tar.xz' | ||||
} | } | ||||
} | } | ||||
} | } |
Wildfire Games · Phabricator