From 28168130aea1cc25ada69ebba416b5c8a9b11dff Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Tue, 6 Feb 2024 11:40:13 +0100 Subject: [PATCH] ci: refs#6706 Jenkinsfile fixes --- Jenkinsfile | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a1341dc98..a49405cdc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,6 +9,16 @@ node { stage('Setup') { env.NODE_ENV = 'dev' + PROTECTED_BRANCH = [ + 'dev', + 'test', + 'master' + ].contains(env.BRANCH_NAME) + + FROM_GIT = env.JOB_NAME.startsWith('gitea/') + RUN_TESTS = !PROTECTED_BRANCH && FROM_GIT + RUN_BUILD = PROTECTED_BRANCH && FROM_GIT + configFileProvider([ configFile(fileId: 'salix.properties', variable: 'PROPS_FILE') @@ -28,21 +38,10 @@ node { } } - PROTECTED_BRANCH = [ - 'dev', - 'test', - 'master' - ].contains(env.BRANCH_NAME) - - FROM_GIT = env.JOB_NAME.startsWith('gitea/') - 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: ${NODE_NAME}" echo "Workspace: ${WORKSPACE}" echo "Debug: ${env.DEBUG}" - echo "Replicas: ${env.BACK_REPLICAS}" } } pipeline {