Merge branch 'dev' into 6444-MigrateVn2008.intrastat_netoFunctionToVn
gitea/salix/pipeline/pr-dev This commit looks good
Details
gitea/salix/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
commit
1358324f81
|
@ -9,25 +9,6 @@ node {
|
||||||
stage('Setup') {
|
stage('Setup') {
|
||||||
env.NODE_ENV = 'dev'
|
env.NODE_ENV = 'dev'
|
||||||
|
|
||||||
configFileProvider([
|
|
||||||
configFile(fileId: 'salix.properties',
|
|
||||||
variable: 'PROPS_FILE')
|
|
||||||
]) {
|
|
||||||
def props = readProperties file: PROPS_FILE
|
|
||||||
env.DEBUG = props.DEBUG
|
|
||||||
}
|
|
||||||
|
|
||||||
if (PROTECTED_BRANCH) {
|
|
||||||
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 = [
|
||||||
'dev',
|
'dev',
|
||||||
'test',
|
'test',
|
||||||
|
@ -39,10 +20,28 @@ node {
|
||||||
RUN_BUILD = PROTECTED_BRANCH && FROM_GIT
|
RUN_BUILD = PROTECTED_BRANCH && FROM_GIT
|
||||||
|
|
||||||
// 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_NAME: ${env.NODE_NAME}"
|
||||||
echo "Workspace: ${WORKSPACE}"
|
echo "WORKSPACE: ${env.WORKSPACE}"
|
||||||
echo "Debug: ${env.DEBUG}"
|
|
||||||
echo "Replicas: ${env.BACK_REPLICAS}"
|
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.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}" }
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pipeline {
|
pipeline {
|
||||||
|
|
Loading…
Reference in New Issue