diff --git a/Jenkinsfile b/Jenkinsfile index 2c101b2183..7b45eafdf5 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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".