Enabled replicas
gitea/smart-tag/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2021-12-15 11:39:14 +01:00
parent ad5c0626d7
commit d29a403143
2 changed files with 3 additions and 21 deletions

22
Jenkinsfile vendored
View File

@ -16,36 +16,18 @@ pipeline {
switch (env.BRANCH_NAME) {
case 'master':
env.NODE_ENV = 'production'
env.BACK_REPLICAS = 2
env.API_REPLICAS = 2
break
/* case 'test':
env.NODE_ENV = 'test'
env.BACK_REPLICAS = 2
env.API_REPLICAS = 2
break */
}
}
/* configFileProvider([
configFile(fileId: "salix.groovy",
variable: 'GROOVY_FILE')
]) {
load env.GROOVY_FILE
} */
setEnv()
}
}
/* stage('Install') {
environment {
NODE_ENV = ""
}
steps {
nodejs('node-v14') {
sh 'npm install --no-audit --prefer-offline'
sh 'gulp install --ci'
}
}
} */
stage('Build') {
when { anyOf {
// branch 'test'

View File

@ -11,7 +11,7 @@ services:
- source: config
target: /app/config.js
deploy:
replicas: 1
replicas: ${API_REPLICAS:?}
placement:
constraints:
- node.role == worker