diff --git a/Jenkinsfile b/Jenkinsfile index 2d27145a9..ec8245758 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -42,21 +42,22 @@ pipeline { break } } - sh 'printenv' configFileProvider([ - configFile(fileId: "salix.env", + configFile(fileId: "salix.groovy", variable: 'ENV_FILE') ]) { - sh '. "$ENV_FILE"' + load ENV_FILE } configFileProvider([ - configFile(fileId: "salix.${env.NODE_ENV}.env", + configFile(fileId: "salix.${env.NODE_ENV}.groovy", variable: 'LOCAL_ENV_FILE') ]) { - sh '. "$LOCAL_ENV_FILE"' + load LOCAL_ENV_FILE } + + sh 'printenv' } } stage('Install') { diff --git a/docker-compose.yml b/docker-compose.yml index 09467902d..4ce6ff18c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,19 +1,19 @@ version: '3.7' services: front: - image: registry.verdnatura.es/salix-front:${BRANCH_NAME} + image: registry.verdnatura.es/salix-front:${BRANCH_NAME:?} build: context: . dockerfile: front/Dockerfile ports: - - ${FRONT_PORT}:80 + - ${FRONT_PORT:?}:80 deploy: replicas: 3 back: - image: registry.verdnatura.es/salix-back:${BRANCH_NAME} + image: registry.verdnatura.es/salix-back:${BRANCH_NAME:?} build: . ports: - - ${BACK_PORT}:3000 + - ${BACK_PORT:?}:3000 environment: - NODE_ENV configs: @@ -35,9 +35,9 @@ configs: external: true salix-branch_datasources: external: true - name: salix-${BRANCH_NAME}_datasources + name: salix-${BRANCH_NAME:?}_datasources salix_print: external: true salix-branch_print: external: true - name: salix-${BRANCH_NAME}_print + name: salix-${BRANCH_NAME:?}_print