From 4c123247d81029641ae2363742613b7ae2ab00ed Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Tue, 6 Feb 2024 12:16:49 +0100 Subject: [PATCH] ci: refs#6706 Jenkinsfile fixes --- Jenkinsfile | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a8091121a..4f6504f3a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -19,12 +19,18 @@ node { RUN_TESTS = !PROTECTED_BRANCH && FROM_GIT RUN_BUILD = PROTECTED_BRANCH && FROM_GIT + // https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#using-environment-variables + echo "Node: ${env.NODE_NAME}" + echo "Workspace: ${env.WORKSPACE}" + echo "Debug: ${env.DEBUG}" + configFileProvider([ configFile(fileId: 'salix.properties', variable: 'PROPS_FILE') ]) { def props = readProperties file: PROPS_FILE - env.DEBUG = props.DEBUG + props.each {key, value -> env.put(key, value) } + props.each {key, value -> echo "${key}: ${value}" } } if (PROTECTED_BRANCH) { @@ -33,15 +39,10 @@ node { variable: 'BRANCH_PROPS_FILE') ]) { def props = readProperties file: BRANCH_PROPS_FILE - env.BACK_REPLICAS = props.BACK_REPLICAS - env.NODE_ENV = props.NODE_ENV + props.each {key, value -> env.put(key, value) } + props.each {key, value -> echo "${key}: ${value}" } } } - - // https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#using-environment-variables - echo "Node: ${env.NODE_NAME}" - echo "Workspace: ${env.WORKSPACE}" - echo "Debug: ${env.DEBUG}" } } pipeline {