refactor: refs #6695 simplify Docker cleanup commands in Jenkinsfile
gitea/salix-front/pipeline/pr-dev There was a failure building this commit Details

This commit is contained in:
Alex Moreno 2025-02-13 09:13:29 +01:00
parent 211877fcc1
commit 4d0b03a480
1 changed files with 3 additions and 2 deletions

5
Jenkinsfile vendored
View File

@ -179,11 +179,12 @@ 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
"""
}