mirror of https://github.com/OpenTTD/OpenTTD
Add: [JenkinsFile] show CI status per entry on GitHub
This makes it easier (and faster) to spot what went wrongpull/6720/head
parent
ae5628e903
commit
2ec775b964
|
@ -16,13 +16,23 @@ def ci_builds_stages = ci_builds_targets.collectEntries {
|
||||||
|
|
||||||
def generateCI(display_name, image_name) {
|
def generateCI(display_name, image_name) {
|
||||||
return {
|
return {
|
||||||
dir("${display_name}") {
|
githubNotify context: 'openttd/' + display_name, description: 'This commit is being built', status: 'PENDING'
|
||||||
unstash "source"
|
|
||||||
|
|
||||||
docker.image("${image_name}").withRun("--volumes-from ${hostname} --workdir " + pwd()) { c->
|
try {
|
||||||
sh "docker logs --follow ${c.id}"
|
dir("${display_name}") {
|
||||||
sh "exit `docker wait ${c.id}`"
|
unstash "source"
|
||||||
|
|
||||||
|
docker.image("${image_name}").withRun("--volumes-from ${hostname} --workdir " + pwd()) { c->
|
||||||
|
sh "docker logs --follow ${c.id}"
|
||||||
|
sh "exit `docker wait ${c.id}`"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
githubNotify context: 'openttd/' + display_name, description: 'The commit looks good', status: 'SUCCESS'
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
githubNotify context: 'openttd/' + display_name, description: 'The commit cannot be built', status: 'FAILURE'
|
||||||
|
throw error
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue