mirror of https://github.com/OpenTTD/OpenTTD
Change: [JenkinsFile] allow easier configuration stages
parent
a5382d8dd8
commit
43338b8a45
|
@ -1,19 +1,24 @@
|
||||||
#!/usr/bin/env groovy
|
#!/usr/bin/env groovy
|
||||||
|
|
||||||
def ci_checkers_targets = [
|
// The stages we run one by one
|
||||||
["commit-checker", "openttd/compile-farm-ci:commit-checker"],
|
// Please don't add more than 2 items in a single stage; this hurts performance
|
||||||
]
|
def ci_stages = [
|
||||||
def ci_builds_targets = [
|
"Checkers": [
|
||||||
["linux-amd64-clang-3.8", "openttd/compile-farm-ci:linux-amd64-clang-3.8"],
|
"commit-checker": "openttd/compile-farm-ci:commit-checker",
|
||||||
["linux-amd64-gcc-6", "openttd/compile-farm-ci:linux-amd64-gcc-6"],
|
],
|
||||||
["linux-i386-gcc-6", "openttd/compile-farm-ci:linux-i386-gcc-6"],
|
"Compilers": [
|
||||||
|
"linux-amd64-gcc-6": "openttd/compile-farm-ci:linux-amd64-gcc-6",
|
||||||
|
"linux-amd64-clang-3.8": "openttd/compile-farm-ci:linux-amd64-clang-3.8",
|
||||||
|
],
|
||||||
|
"Archs": [
|
||||||
|
"linux-i386-gcc-6": "openttd/compile-farm-ci:linux-i386-gcc-6",
|
||||||
|
],
|
||||||
]
|
]
|
||||||
|
|
||||||
def ci_checkers_stages = ci_checkers_targets.collectEntries {
|
def generateStage(targets) {
|
||||||
["${it[0]}" : generateCI(it[0], it[1])]
|
return targets.collectEntries{ key, target ->
|
||||||
|
["${key}": generateCI(key, target)]
|
||||||
}
|
}
|
||||||
def ci_builds_stages = ci_builds_targets.collectEntries {
|
|
||||||
["${it[0]}" : generateCI(it[0], it[1])]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def generateCI(display_name, image_name) {
|
def generateCI(display_name, image_name) {
|
||||||
|
@ -50,12 +55,10 @@ node {
|
||||||
stash name: "source", useDefaultExcludes: false
|
stash name: "source", useDefaultExcludes: false
|
||||||
}
|
}
|
||||||
|
|
||||||
stage("Checkers") {
|
ci_stages.each { ci_stage ->
|
||||||
parallel ci_checkers_stages
|
stage(ci_stage.key) {
|
||||||
|
parallel generateStage(ci_stage.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
stage("Builds") {
|
|
||||||
parallel ci_builds_stages
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue