From d29a40314353631a32e4cf46c60d18f455c31d28 Mon Sep 17 00:00:00 2001 From: joan Date: Wed, 15 Dec 2021 11:39:14 +0100 Subject: [PATCH] Enabled replicas --- Jenkinsfile | 22 ++-------------------- docker-compose.yml | 2 +- 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 645e435..5e44231 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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' diff --git a/docker-compose.yml b/docker-compose.yml index cdce5b7..08aa95f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,7 @@ services: - source: config target: /app/config.js deploy: - replicas: 1 + replicas: ${API_REPLICAS:?} placement: constraints: - node.role == worker