Select build environment on CI based on branch name

This commit is contained in:
Arjen Hiemstra 2017-05-29 16:59:38 +02:00
parent bbd852ceb7
commit d531d85aa2

9
Jenkinsfile vendored
View file

@ -14,9 +14,14 @@ parallel_nodes(['linux && cura', 'windows && cura']) {
dir('build') {
// Perform the "build". Since Uranium is Python code, this basically only ensures CMake is setup.
stage('Build') {
def branch = env.BRANCH_NAME
if(!(branch =~ /^2.\d+$/)) {
branch = "master"
}
// Ensure CMake is setup. Note that since this is Python code we do not really "build" it.
def uranium_dir = get_workspace_dir("Ultimaker/Uranium/master")
cmake("..", "-DCMAKE_PREFIX_PATH=${env.CURA_ENVIRONMENT_PATH} -DCMAKE_BUILD_TYPE=Release -DURANIUM_DIR=${uranium_dir}")
def uranium_dir = get_workspace_dir("Ultimaker/Uranium/${branch}")
cmake("..", "-DCMAKE_PREFIX_PATH=${env.CURA_ENVIRONMENT_PATH}/${branch} -DCMAKE_BUILD_TYPE=Release -DURANIUM_DIR=${uranium_dir}")
}
// Try and run the unit tests. If this stage fails, we consider the build to be "unstable".