ci: refs#6706 Jenkinsfile fixes
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
4af454edd4
commit
28168130ae
|
@ -9,6 +9,16 @@ node {
|
||||||
stage('Setup') {
|
stage('Setup') {
|
||||||
env.NODE_ENV = 'dev'
|
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([
|
configFileProvider([
|
||||||
configFile(fileId: 'salix.properties',
|
configFile(fileId: 'salix.properties',
|
||||||
variable: 'PROPS_FILE')
|
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
|
// 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}"
|
echo "Debug: ${env.DEBUG}"
|
||||||
echo "Replicas: ${env.BACK_REPLICAS}"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
pipeline {
|
pipeline {
|
||||||
|
|
Loading…
Reference in New Issue