From 5f9b768d2d6c0b94b6c7fc00bbd4fecb0228f263 Mon Sep 17 00:00:00 2001 From: alexm Date: Thu, 13 Feb 2025 09:10:18 +0100 Subject: [PATCH] refactor: refs #6695 simplify Docker cleanup commands in Jenkinsfile --- Jenkinsfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 531451ea5..92930f4ef 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -178,8 +178,12 @@ def cleanDockerE2E() { script { 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""" - sh """docker network ls --filter "name=^${projectBranch}" | awk 'NR>1 {print $1}' | xargs -r docker network rm || true""" + sh """ + 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 + """ } }