mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 18:23:22 +02:00
make constants global, wrap cmake configure block in method
This commit is contained in:
parent
aec145a23e
commit
923b12ead8
1 changed files with 30 additions and 24 deletions
|
@ -1,16 +1,16 @@
|
|||
JENKINS_URL = 'https://jenkins.below92.com/'
|
||||
GITHUB_HOOK_URL = 'https://github.com/worklist/hifi/'
|
||||
GIT_REPO_URL = 'git@github.com:worklist/hifi.git'
|
||||
HIPCHAT_ROOM = 'High Fidelity'
|
||||
|
||||
def hifiJob(String targetName, Boolean deploy) {
|
||||
def JENKINS_URL = 'https://jenkins.below92.com/'
|
||||
def GITHUB_HOOK_URL = 'https://github.com/worklist/hifi/'
|
||||
def GIT_REPO_URL = 'git@github.com:worklist/hifi.git'
|
||||
def HIPCHAT_ROOM = 'High Fidelity'
|
||||
|
||||
job {
|
||||
name "hifi-${targetName}"
|
||||
logRotator(7, -1, -1, -1)
|
||||
|
||||
scm {
|
||||
git(GIT_REPO_URL, 'master') { node ->
|
||||
node / includedRegions << "${targetName}/.*\nlibraries/.*"
|
||||
node << includedRegions << "${targetName}/.*\nlibraries/.*"
|
||||
node / 'userRemoteConfigs' / 'hudson.plugins.git.UserRemoteConfig' / 'name' << ''
|
||||
node / 'userRemoteConfigs' / 'hudson.plugins.git.UserRemoteConfig' / 'refspec' << ''
|
||||
}
|
||||
|
@ -35,23 +35,9 @@ def hifiJob(String targetName, Boolean deploy) {
|
|||
project / 'triggers' << 'com.cloudbees.jenkins.GitHubPushTrigger' {
|
||||
spec ''
|
||||
}
|
||||
|
||||
project / 'builders' << 'hudson.plugins.cmake.CmakeBuilder' {
|
||||
sourceDir targetName
|
||||
buildDir 'build'
|
||||
installDir ''
|
||||
buildType 'RelWithDebInfo'
|
||||
generator 'Unix Makefiles'
|
||||
makeCommand 'make'
|
||||
installCommand 'make install'
|
||||
preloadScript ''
|
||||
cmakeArgs ''
|
||||
projectCmakePath '/usr/bin/cmake'
|
||||
cleanBuild 'false'
|
||||
cleanInstallDir 'false'
|
||||
builderImpl ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configure cmakeBuild(targetName, 'make install')
|
||||
|
||||
if (deploy) {
|
||||
publishers {
|
||||
|
@ -92,6 +78,26 @@ def hifiJob(String targetName, Boolean deploy) {
|
|||
}
|
||||
}
|
||||
|
||||
static Closure cmakeBuild(srcDir, instCommand) {
|
||||
return { project ->
|
||||
project / 'builders' / 'hudson.plugins.cmake.CmakeBuilder' {
|
||||
sourceDir srcDir
|
||||
buildDir 'build'
|
||||
installDir ''
|
||||
buildType 'RelWithDebInfo'
|
||||
generator 'Unix Makefiles'
|
||||
makeCommand 'make'
|
||||
installCommand instCommand
|
||||
preloadScript ''
|
||||
cmakeArgs ''
|
||||
projectCmakePath '/usr/bin/cmake'
|
||||
cleanBuild 'false'
|
||||
cleanInstallDir 'false'
|
||||
builderImpl ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def targets = [
|
||||
'animation-server':true,
|
||||
'audio-mixer':true,
|
||||
|
@ -109,7 +115,7 @@ for (target in targets) {
|
|||
queue hifiJob(target.key, target.value)
|
||||
}
|
||||
|
||||
/* setup the parametrized-build job for builds from jenkins */
|
||||
/* setup the parametrized build job for builds from jenkins */
|
||||
parameterizedJob = hifiJob('$TARGET', true)
|
||||
parameterizedJob.with {
|
||||
name 'hifi-branch-deploy'
|
||||
|
|
Loading…
Reference in a new issue