diff --git a/Jenkinsfile b/Jenkinsfile index 034bda012..2c04bcf16 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,26 +29,24 @@ node { echo "NODE_NAME: ${env.NODE_NAME}" echo "WORKSPACE: ${env.WORKSPACE}" - if (FROM_GIT) { + configFileProvider([ + configFile(fileId: 'salix.properties', + variable: 'PROPS_FILE') + ]) { + def props = readProperties file: PROPS_FILE + props.each {key, value -> env."${key}" = value } + props.each {key, value -> echo "${key}: ${value}" } + } + + if (PROTECTED_BRANCH) { configFileProvider([ - configFile(fileId: 'salix.properties', - variable: 'PROPS_FILE') + configFile(fileId: "salix.branch.${env.BRANCH_NAME}", + variable: 'BRANCH_PROPS_FILE') ]) { - def props = readProperties file: PROPS_FILE + def props = readProperties file: BRANCH_PROPS_FILE props.each {key, value -> env."${key}" = value } props.each {key, value -> echo "${key}: ${value}" } } - - if (PROTECTED_BRANCH) { - configFileProvider([ - configFile(fileId: "salix.branch.${env.BRANCH_NAME}", - variable: 'BRANCH_PROPS_FILE') - ]) { - def props = readProperties file: BRANCH_PROPS_FILE - props.each {key, value -> env."${key}" = value } - props.each {key, value -> echo "${key}: ${value}" } - } - } } } }