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.
This commit is contained in:
Arjen Hiemstra 2017-08-02 16:36:12 +02:00
parent cf25515b90
commit 07ff4054e9

2
Jenkinsfile vendored
View File

@ -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"
}