Changeset - r22798:627ddc78c732
[Not reviewed]
master
0 1 0
Patric Stout - 7 years ago 2018-04-14 14:00:25
truebrain@openttd.org
Add: [JenkinsFile] show CI status per entry on GitHub

This makes it easier (and faster) to spot what went wrong
1 file changed with 15 insertions and 5 deletions:
0 comments (0 inline, 0 general)
Jenkinsfile
Show inline comments
 
@@ -16,13 +16,23 @@ def ci_builds_stages = ci_builds_targets
 

	
 
def generateCI(display_name, image_name) {
 
    return {
 
        dir("${display_name}") {
 
            unstash "source"
 
        githubNotify context: 'openttd/' + display_name, description: 'This commit is being built', status: 'PENDING'
 

	
 
        try {
 
            dir("${display_name}") {
 
                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}`"
 
                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
 
        }
 
    }
 
}
0 comments (0 inline, 0 general)