From 211877fcc1c8a70af31b01e356dcd44c592886b8 Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 13 Feb 2025 09:12:10 +0100 Subject: [PATCH] refactor: refs #6695 simplify Docker cleanup commands in Jenkinsfile --- Jenkinsfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 92930f4ef..a83f30d07 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -179,10 +179,11 @@ def cleanDockerE2E() { def projectBranch = "${PROJECT_NAME}-${env.BRANCH_NAME}".toLowerCase() // STOP AND REMOVE sh """ - docker ps -a --filter "name=^${projectBranch}" | awk 'NR>1 {print $1}' | xargs -r docker rm -v || true + docker ps -a --filter 'name=^${projectBranch}' | awk 'NR>1 {print \$1}' | xargs -r docker rm -v || true """ + sh """ - docker network ls --filter "name=^${projectBranch}" | awk 'NR>1 {print $1}' | xargs -r docker network rm || true + docker network ls --filter 'name=^${projectBranch}' | awk 'NR>1 {print $1}' | xargs -r docker network rm || true """ }