diff --git a/Jenkinsfile b/Jenkinsfile index a1dec37fa..2d27145a9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,7 +21,18 @@ pipeline { } else { env.COMMITTER_EMAIL = env.GIT_COMMITTER_EMAIL; } - +/* + switch (env.BRANCH_NAME) { + case 'master': + env.FRONT_PORT = SALIX_MASTER_FRONT_PORT + env.BACK_PORT = SALIX_MASTER_BACK_PORT + break + case 'test': + env.FRONT_PORT = SALIX_TEST_FRONT_PORT + env.BACK_PORT = SALIX_TEST_BACK_PORT + break + } +*/ switch (env.BRANCH_NAME) { case 'master': env.NODE_ENV = 'production' @@ -35,16 +46,16 @@ pipeline { configFileProvider([ configFile(fileId: "salix.env", - variable: 'SALIX_ENV') + variable: 'ENV_FILE') ]) { - sh 'source "$SALIX_ENV"' + sh '. "$ENV_FILE"' } configFileProvider([ configFile(fileId: "salix.${env.NODE_ENV}.env", - variable: 'SALIX_LOCAL_ENV') + variable: 'LOCAL_ENV_FILE') ]) { - sh 'source "$SALIX_LOCAL_ENV"' + sh '. "$LOCAL_ENV_FILE"' } } } diff --git a/docker-compose.yml b/docker-compose.yml index a899098d3..09467902d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,14 +6,14 @@ services: context: . dockerfile: front/Dockerfile ports: - - ${PORT_FRONT}:80 + - ${FRONT_PORT}:80 deploy: replicas: 3 back: image: registry.verdnatura.es/salix-back:${BRANCH_NAME} build: . ports: - - ${PORT_BACK}:3000 + - ${BACK_PORT}:3000 environment: - NODE_ENV configs: