fix: Pr stopps main deployment

This commit is contained in:
Andras Bacsai
2022-11-04 12:08:20 +01:00
parent 25e6a74a0a
commit 1b753a4020

View File

@@ -131,7 +131,6 @@ import * as buildpacks from '../lib/buildPacks';
try { try {
dockerComposeConfiguration = JSON.parse(dockerComposeConfiguration) dockerComposeConfiguration = JSON.parse(dockerComposeConfiguration)
} catch (error) { } } catch (error) { }
let deployNeeded = true; let deployNeeded = true;
let destinationType; let destinationType;
@@ -313,11 +312,11 @@ import * as buildpacks from '../lib/buildPacks';
try { try {
await executeDockerCmd({ await executeDockerCmd({
dockerId: destinationDockerId, 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({ await executeDockerCmd({
dockerId: destinationDockerId, 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) { } catch (error) {
// //