refs #6915 test_master24_8 #2067

Merged
alexm merged 561 commits from test_master24_8 into master 2024-02-22 07:31:34 +00:00
1 changed files with 20 additions and 19 deletions
Showing only changes of commit e581247954 - Show all commits

39
Jenkinsfile vendored
View File

@ -7,18 +7,25 @@ def RUN_BUILD
node { node {
stage('Setup') { stage('Setup') {
switch (env.BRANCH_NAME) { env.NODE_ENV = 'dev'
case 'test':
env.NODE_ENV = 'test' configFileProvider([
env.BACK_REPLICAS = 2 configFile(fileId: 'salix.properties',
break variable: 'PROPS_FILE')
case 'master': ]) {
env.NODE_ENV = 'production' def props = readProperties file: PROPS_FILE
env.BACK_REPLICAS = 4 env.DEBUG = props.DEBUG
break }
default:
env.NODE_ENV = 'dev' if (PROTECTED_BRANCH) {
env.BACK_REPLICAS = 1 configFileProvider([
configFile(fileId: "salix.branch.${env.BRANCH_NAME}",
variable: 'BRANCH_PROPS_FILE')
]) {
def props = readProperties file: BRANCH_PROPS_FILE
env.BACK_REPLICAS = props.BACK_REPLICAS
env.NODE_ENV = props.NODE_ENV
}
} }
PROTECTED_BRANCH = [ PROTECTED_BRANCH = [
@ -31,16 +38,10 @@ node {
RUN_TESTS = !PROTECTED_BRANCH && FROM_GIT RUN_TESTS = !PROTECTED_BRANCH && FROM_GIT
RUN_BUILD = PROTECTED_BRANCH && FROM_GIT RUN_BUILD = PROTECTED_BRANCH && FROM_GIT
configFileProvider([
configFile(fileId: "salix.groovy",
variable: 'GROOVY_FILE')
]) {
load env.GROOVY_FILE
}
// https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#using-environment-variables // https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#using-environment-variables
echo "Node: ${NODE_NAME}" echo "Node: ${NODE_NAME}"
echo "Workspace: ${WORKSPACE}" echo "Workspace: ${WORKSPACE}"
echo "Debug: ${env.DEBUG}"
} }
} }
pipeline { pipeline {