mirror of
https://github.com/overte-org/overte.git
synced 2025-06-05 07:00:34 +02:00
add conditional deploy of target
This commit is contained in:
parent
f6fa956144
commit
53d3eea0b1
1 changed files with 43 additions and 35 deletions
|
@ -1,24 +1,10 @@
|
||||||
def targets = [
|
def hifiJob(String targetName, Boolean deploy) {
|
||||||
'animation-server',
|
def JENKINS_URL = 'https://jenkins.below92.com/'
|
||||||
'audio-mixer',
|
def GITHUB_HOOK_URL = 'https://github.com/worklist/hifi/'
|
||||||
'avatar-mixer',
|
def GIT_REPO_URL = 'git@github.com:worklist/hifi.git'
|
||||||
'domain-server',
|
def HIPCHAT_AUTH_TOKEN = '4ad6553471db605629852ff3265408'
|
||||||
'eve',
|
def HIPCHAT_ROOM = 'High Fidelity'
|
||||||
'interface',
|
def ARTIFACT_DESTINATION = 'a-tower.below92.com'
|
||||||
'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 {
|
job {
|
||||||
name "hifi-${targetName}"
|
name "hifi-${targetName}"
|
||||||
|
@ -68,26 +54,31 @@ targets.each {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
publishers {
|
if (deploy) {
|
||||||
publishScp(ARTIFACT_DESTINATION) {
|
publishers {
|
||||||
entry("**/build/${targetName}", "deploy/${targetName}")
|
publishScp(ARTIFACT_DESTINATION) {
|
||||||
|
entry("**/build/${targetName}", "deploy/${targetName}")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
configure { project ->
|
configure { project ->
|
||||||
|
|
||||||
project / 'publishers' << {
|
project / 'publishers' << {
|
||||||
'hudson.plugins.postbuildtask.PostbuildTask' {
|
if (deploy) {
|
||||||
'tasks' {
|
'hudson.plugins.postbuildtask.PostbuildTask' {
|
||||||
'hudson.plugins.postbuildtask.TaskProperties' {
|
'tasks' {
|
||||||
logTexts {
|
'hudson.plugins.postbuildtask.TaskProperties' {
|
||||||
'hudson.plugins.postbuildtask.LogProperties' {
|
logTexts {
|
||||||
logText '.'
|
'hudson.plugins.postbuildtask.LogProperties' {
|
||||||
operator 'AND'
|
logText '.'
|
||||||
|
operator 'AND'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
EscalateStatus true
|
||||||
|
RunIfJobSuccessful true
|
||||||
|
script "curl -d 'action=deploy&role=highfidelity-live&revision=${targetName}' https://a-tower.below92.com"
|
||||||
}
|
}
|
||||||
EscalateStatus true
|
|
||||||
RunIfJobSuccessful true
|
|
||||||
script "curl -d 'action=deploy&role=highfidelity-live&revision=${targetName}' https://a-tower.below92.com"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -100,4 +91,21 @@ targets.each {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def deployTargets = [
|
||||||
|
'animation-server',
|
||||||
|
'audio-mixer',
|
||||||
|
'avatar-mixer',
|
||||||
|
'domain-server',
|
||||||
|
'eve',
|
||||||
|
'pairing-server',
|
||||||
|
'space-server',
|
||||||
|
'voxel-server'
|
||||||
|
]
|
||||||
|
|
||||||
|
deployTargets.each {
|
||||||
|
hifiJob(it, true)
|
||||||
|
}
|
||||||
|
|
||||||
|
hifiJob('interface', false)
|
Loading…
Reference in a new issue