diff options
author | TrueBrain <truebrain@openttd.org> | 2018-03-24 17:58:40 +0100 |
---|---|---|
committer | Patric Stout <TrueBrain@users.noreply.github.com> | 2018-04-07 21:29:23 +0200 |
commit | 11c592ef0fdd5109716a4a5501bef6d3517fd181 (patch) | |
tree | d36d18c9a37491757df7f33616f7bbcfab0c2739 /Jenkinsfile | |
parent | f84ad5f7c053dc4af3c0fc12bc6584d825a5bf91 (diff) | |
download | openttd-11c592ef0fdd5109716a4a5501bef6d3517fd181.tar.xz |
Add: Jenkinsfile for CI validation
Currently runs two CIs, but this can be extended in the future
Diffstat (limited to 'Jenkinsfile')
-rw-r--r-- | Jenkinsfile | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000..23802f5f1 --- /dev/null +++ b/Jenkinsfile @@ -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 + } +} + |