mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-08 23:19:40 +00:00
Add: Jenkinsfile for CI validation
Currently runs two CIs, but this can be extended in the future
This commit is contained in:
parent
f84ad5f7c0
commit
11c592ef0f
31
Jenkinsfile
vendored
Normal file
31
Jenkinsfile
vendored
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user