diff --git a/Jenkinsfile b/Jenkinsfile index d77a2d521..f4fac33c3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,6 +7,7 @@ pipeline { environment { PROJECT_NAME = 'salix' STACK_NAME = "${env.PROJECT_NAME}-${env.BRANCH_NAME}" + STACK_NAME_LC= "${env.PROJECT_NAME}-${env.BRANCH_NAME}".toLowerCase() } stages { stage('Checkout') { @@ -41,6 +42,7 @@ pipeline { steps { sh "docker-compose -p testing-${env.STACK_NAME} -f docker-compose.test.yml rm --stop" sh "docker-compose -p testing-${env.STACK_NAME} -f docker-compose.test.yml build --force-rm db back" + sh "docker network create testing-${STACK_NAME_LC}_default || true" } } stage('Test') { @@ -73,11 +75,10 @@ pipeline { environment { NODE_ENV = "" TZ = 'Europe/Madrid' - STACK_NAME_LC="${env.STACK_NAME}".toLowerCase() } steps { sh "docker-compose -p testing-${env.STACK_NAME} -f docker-compose.test.yml rm -s -f" - sh "docker network rm testing-${STACK_NAME_LC}_default" + sh "docker network rm testing-${env.STACK_NAME_LC}_default" } } stage('Build') {