From 07ff4054e9bb9ed6e621ba51fdd3e1f637605f00 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 2 Aug 2017 16:36:12 +0200 Subject: [PATCH 1/3] Fall back properly if the build env for a specific branch does not exist Otherwise we will always need to create branches for cura-build-environment. In addition, we can now create build-specific branches if needed. --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7b45eafdf5..f7c43dd8bd 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,7 +15,7 @@ parallel_nodes(['linux && cura', 'windows && cura']) { // 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+$/)) { + if(branch != "master" && !fileExists("${env.CURA_ENVIRONMENT_PATH}/${branch})) { branch = "master" } From 7b3290213a976e6a86e1832143520f09632fe4d8 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 2 Aug 2017 16:41:51 +0200 Subject: [PATCH 2/3] Add missing " sign --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index f7c43dd8bd..6ff63e2772 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -15,7 +15,7 @@ parallel_nodes(['linux && cura', 'windows && cura']) { // Perform the "build". Since Uranium is Python code, this basically only ensures CMake is setup. stage('Build') { def branch = env.BRANCH_NAME - if(branch != "master" && !fileExists("${env.CURA_ENVIRONMENT_PATH}/${branch})) { + if(!fileExists("${env.CURA_ENVIRONMENT_PATH}/${branch}")) { branch = "master" } From 103f880d0aeefa971c9488ce319f535e1412c2b0 Mon Sep 17 00:00:00 2001 From: Arjen Hiemstra Date: Wed, 2 Aug 2017 16:43:42 +0200 Subject: [PATCH 3/3] Properly quote CMake arguments that may contain spaces on Windows --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6ff63e2772..6408cbf9b2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,7 +21,7 @@ parallel_nodes(['linux && cura', 'windows && cura']) { // 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/${branch}") - cmake("..", "-DCMAKE_PREFIX_PATH=${env.CURA_ENVIRONMENT_PATH}/${branch} -DCMAKE_BUILD_TYPE=Release -DURANIUM_DIR=${uranium_dir}") + 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".