From 5ce6c4834dd4bf65632b34223588ea349f4c3f5c Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Thu, 21 Oct 2021 13:36:27 +0200 Subject: [PATCH] Test branch --- Jenkinsfile | 3 ++- docker-compose.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2bfeede..c9830b4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,6 +4,7 @@ pipeline { agent any environment { PROJECT_NAME = 'worker-time-control' + STACK_NAME = "${env.PROJECT_NAME}-${env.BRANCH_NAME}" } stages { stage('Checkout') { @@ -24,7 +25,7 @@ pipeline { DOCKER_HOST = "${env.SWARM_HOST}" } steps { - sh "docker stack deploy --with-registry-auth --prune --compose-file docker-compose.yml ${env.PROJECT_NAME}" + sh "docker stack deploy --with-registry-auth --prune --compose-file docker-compose.yml ${env.STACK_NAME}" } } } diff --git a/docker-compose.yml b/docker-compose.yml index 5d9e248..a00e8e0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,4 +16,4 @@ services: configs: config: external: true - name: worker-time-control_config + name: worker-time-control_${BRANCH_NAME:?}_config -- 2.40.1