ci: refs#6706 Jenkinsfile fixes
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Juan Ferrer 2024-02-07 13:56:21 +01:00
parent eda85eda76
commit c4907d1a33
1 changed files with 13 additions and 15 deletions

28
Jenkinsfile vendored
View File

@ -29,26 +29,24 @@ node {
echo "NODE_NAME: ${env.NODE_NAME}" echo "NODE_NAME: ${env.NODE_NAME}"
echo "WORKSPACE: ${env.WORKSPACE}" 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([ configFileProvider([
configFile(fileId: 'salix.properties', configFile(fileId: "salix.branch.${env.BRANCH_NAME}",
variable: 'PROPS_FILE') 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 -> env."${key}" = value }
props.each {key, value -> echo "${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}" }
}
}
} }
} }
} }