Changeset - r22771:1d76547d631d
[Not reviewed]
master
0 0 1
TrueBrain - 6 years ago 2018-03-24 16:58:40
truebrain@openttd.org
Add: Jenkinsfile for CI validation

Currently runs two CIs, but this can be extended in the future
1 file changed with 31 insertions and 0 deletions:
0 comments (0 inline, 0 general)
Jenkinsfile
Show inline comments
 
new file 100644
 
def ci_targets = [
 
    ["linux-amd64", "openttd/compile-farm-ci:linux-amd64"],
 
    ["linux-i386", "openttd/compile-farm-ci:linux-i386"],
 
]
 
def ci_stages = ci_targets.collectEntries {
 
    ["${it[0]}" : generateCI(it[0], it[1])]
 
}
 

	
 
def generateCI(display_name, image_name) {
 
    return {
 
        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}`"
 
            }
 
        }
 
    }
 
}
 

	
 
node {
 
    stage("Checkout") {
 
        checkout scm
 
        stash name: "source", useDefaultExcludes: false
 
    }
 

	
 
    stage("CI") {
 
        parallel ci_stages
 
    }
 
}
 

	
0 comments (0 inline, 0 general)