Created
February 19, 2018 16:37
-
-
Save jonico/5e82177e984bcbb570b19adb2a049adb to your computer and use it in GitHub Desktop.
Abbreviated Jenkinsfile to build on multiple archs (from conan.io project)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (x in slaves) { | |
def slave = x | |
for (y in pyvers) { | |
def pyver = y | |
builders["${slave} - ${pyver}"] = { | |
node(slave) { | |
stage("${slave} - ${pyver}"){ | |
step ([$class: 'WsCleanup']) | |
checkout scm | |
def bn = env.BUILD_NUMBER | |
... | |
if(slave == "Linux"){ | |
docker.image('lasote/conantests').inside("-e CONAN_USER_HOME=${WORKSPACE}") { | |
sh(script: "python ${runner} ${modules} ${pyver} ${branch} ${workdir} --num_cores=${numcores}") | |
} | |
} | |
else if(slave == "Windows"){ | |
... | |
withEnv(["CONAN_TEST_FOLDER=${workdir}"]){ | |
bat(script: "python ${runner} ${modules} ${pyver} ${branch} \"${workdir}\" --num_cores=${numcores}") | |
} | |
... | |
} | |
else if(slave == "Macos"){ | |
... | |
withEnv(['PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin']) { | |
sh(script: "python ${runner} ${modules} ${pyver} ${branch} ${workdir} --num_cores=${numcores}") | |
} | |
... | |
} | |
} | |
} | |
} | |
} | |
} | |
parallel builders |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment