Add: [JenkinsFile] show CI status per entry on GitHub
This makes it easier (and faster) to spot what went wrong
This commit is contained in:
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
@@ -16,6 +16,9 @@ def ci_builds_stages = ci_builds_targets.collectEntries {
|
||||
|
||||
def generateCI(display_name, image_name) {
|
||||
return {
|
||||
githubNotify context: 'openttd/' + display_name, description: 'This commit is being built', status: 'PENDING'
|
||||
|
||||
try {
|
||||
dir("${display_name}") {
|
||||
unstash "source"
|
||||
|
||||
@@ -24,6 +27,13 @@ def generateCI(display_name, image_name) {
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user