Jenkinsfile fix

This commit is contained in:
Juan Ferrer 2019-01-11 14:01:02 +01:00
parent bd90f302bf
commit b8b78f9517
1 changed files with 22 additions and 22 deletions

44
Jenkinsfile vendored
View File

@ -10,30 +10,30 @@ pipeline {
TAG = "${env.BRANCH_NAME}"
}
stages {
stage ('Checkout') {
script {
env.COMPOSE_PROJECT_NAME = env.JOB_NAME.replace('/', '-');
script {
env.COMPOSE_PROJECT_NAME = env.JOB_NAME.replace('/', '-');
switch (env.BRANCH_NAME) {
case 'master':
env.PORT = 5002
break;
case 'test':
env.PORT = 5001
break;
}
switch (env.BRANCH_NAME) {
case 'master':
env.NODE_ENV = 'production'
break;
case 'test':
env.NODE_ENV = 'test'
break;
case 'dev':
env.NODE_ENV = 'development'
break;
}
switch (env.BRANCH_NAME) {
case 'master':
env.PORT = 5002
break;
case 'test':
env.PORT = 5001
break;
}
switch (env.BRANCH_NAME) {
case 'master':
env.NODE_ENV = 'production'
break;
case 'test':
env.NODE_ENV = 'test'
break;
case 'dev':
env.NODE_ENV = 'development'
break;
}
}
stage ('Checkout') {
checkout scm
script {
env.GIT_COMMITTER_EMAIL = sh(