From 1b753a40207ecad770ea31de02a1362c2a1fdbe8 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 4 Nov 2022 12:08:20 +0100 Subject: [PATCH] fix: Pr stopps main deployment --- apps/api/src/jobs/deployApplication.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/api/src/jobs/deployApplication.ts b/apps/api/src/jobs/deployApplication.ts index b2d2c8ec9..42e1bcef8 100644 --- a/apps/api/src/jobs/deployApplication.ts +++ b/apps/api/src/jobs/deployApplication.ts @@ -131,7 +131,6 @@ import * as buildpacks from '../lib/buildPacks'; try { dockerComposeConfiguration = JSON.parse(dockerComposeConfiguration) } catch (error) { } - let deployNeeded = true; let destinationType; @@ -313,11 +312,11 @@ import * as buildpacks from '../lib/buildPacks'; try { await executeDockerCmd({ dockerId: destinationDockerId, - command: `docker ps -a --filter 'label=com.docker.compose.service=${applicationId}' --format {{.ID}}|xargs -r -n 1 docker stop -t 0` + command: `docker ps -a --filter 'label=com.docker.compose.service=${pullmergeRequestId ? imageId : applicationId}' --format {{.ID}}|xargs -r -n 1 docker stop -t 0` }) await executeDockerCmd({ dockerId: destinationDockerId, - command: `docker ps -a --filter 'label=com.docker.compose.service=${applicationId}' --format {{.ID}}|xargs -r -n 1 docker rm --force` + command: `docker ps -a --filter 'label=com.docker.compose.service=${pullmergeRequestId ? imageId : applicationId}' --format {{.ID}}|xargs -r -n 1 docker rm --force` }) } catch (error) { //