Jenkinsfile changes
gitea/salix/test There was a failure building this commit Details

This commit is contained in:
Juan Ferrer 2019-12-23 15:02:30 +01:00
parent e2830badb9
commit 77d454e519
2 changed files with 18 additions and 7 deletions

21
Jenkinsfile vendored
View File

@ -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"'
}
}
}

View File

@ -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: