From 6a55bc92270b9367a417ca8dfd57cd2311ab4a1e Mon Sep 17 00:00:00 2001 From: alexm Date: Tue, 16 Jan 2024 10:03:12 +0100 Subject: [PATCH] refs #5739 fix: jenkins network --- Jenkinsfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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') {