mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
Merge pull request #549 from birarda/jenkins
add a DSL for hifi jenkins jobs
This commit is contained in:
commit
51a8920f09
1 changed files with 103 additions and 0 deletions
103
jenkins/jobs.groovy
Normal file
103
jenkins/jobs.groovy
Normal file
|
@ -0,0 +1,103 @@
|
|||
def targets = [
|
||||
'animation-server',
|
||||
'audio-mixer',
|
||||
'avatar-mixer',
|
||||
'domain-server',
|
||||
'eve',
|
||||
'interface',
|
||||
'pairing-server',
|
||||
'space-server',
|
||||
'voxel-server'
|
||||
]
|
||||
|
||||
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_AUTH_TOKEN = '4ad6553471db605629852ff3265408'
|
||||
def HIPCHAT_ROOM = 'High Fidelity'
|
||||
def ARTIFACT_DESTINATION = 'a-tower.below92.com'
|
||||
|
||||
targets.each {
|
||||
def targetName = it
|
||||
|
||||
job {
|
||||
name "hifi-${targetName}"
|
||||
logRotator(7, -1, -1, -1)
|
||||
|
||||
scm {
|
||||
git(GIT_REPO_URL)
|
||||
}
|
||||
|
||||
configure { project ->
|
||||
project / 'properties' << {
|
||||
'com.coravy.hudson.plugins.github.GithubProjectProperty' {
|
||||
projectUrl GITHUB_HOOK_URL
|
||||
}
|
||||
|
||||
'jenkins.plugins.hipchat.HipChatNotifier_-HipChatJobProperty' {
|
||||
room HIPCHAT_ROOM
|
||||
}
|
||||
'hudson.plugins.buildblocker.BuildBlockerProperty' {
|
||||
useBuildBlocker true
|
||||
blockingJobs 'hifi-seed'
|
||||
}
|
||||
}
|
||||
|
||||
project / 'scm' << {
|
||||
includedRegions "${targetName}/.*\nlibraries/.*"
|
||||
}
|
||||
|
||||
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 ''
|
||||
}
|
||||
}
|
||||
|
||||
publishers {
|
||||
publishScp(ARTIFACT_DESTINATION) {
|
||||
entry("**/build/${targetName}", "deploy/${targetName}")
|
||||
}
|
||||
}
|
||||
|
||||
configure { project ->
|
||||
project / 'publishers' << {
|
||||
'hudson.plugins.postbuildtask.PostbuildTask' {
|
||||
'tasks' {
|
||||
'hudson.plugins.postbuildtask.TaskProperties' {
|
||||
logTexts {
|
||||
'hudson.plugins.postbuildtask.LogProperties' {
|
||||
logText '.'
|
||||
operator 'AND'
|
||||
}
|
||||
}
|
||||
EscalateStatus true
|
||||
RunIfJobSuccessful true
|
||||
script "curl -d 'action=deploy&role=highfidelity-live&revision=${targetName}' https://a-tower.below92.com"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
'jenkins.plugins.hipchat.HipChatNotifier' {
|
||||
jenkinsUrl JENKINS_URL
|
||||
authToken HIPCHAT_AUTH_TOKEN
|
||||
room HIPCHAT_ROOM
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue