diff options
author | Arjen Hiemstra <ahiemstra@heimr.nl> | 2017-05-29 17:59:38 +0300 |
---|---|---|
committer | Arjen Hiemstra <ahiemstra@heimr.nl> | 2017-05-29 18:00:02 +0300 |
commit | d531d85aa26370066ca491b5dad2b1f0b6bedac0 (patch) | |
tree | 7786098a03d12d78c9571713d615ee4ffd5fd200 /Jenkinsfile | |
parent | bbd852ceb713b20956d66c9afedafe00b64ca712 (diff) |
Select build environment on CI based on branch name
Diffstat (limited to 'Jenkinsfile')
-rw-r--r-- | Jenkinsfile | 9 |
1 files changed, 7 insertions, 2 deletions
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". |