Update commonFunctions.groovy

Jenkinsfile: return true on removeStrandedContainers
pull/664/head
Pablo Fuente Pérez 2021-11-03 09:32:37 +01:00 committed by GitHub
parent 788eb61ef9
commit e9b216f84e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -111,7 +111,7 @@ def removeStrandedContainers(removeTestingContainers) {
fi fi
for image in "${arr[@]}" for image in "${arr[@]}"
do do
docker ps -a | awk '{ print $1,$2 }' | grep "${image}" | awk '{ print $1 }' | xargs -I {} docker rm -f {} docker ps -a | awk '{ print $1,$2 }' | grep "${image}" | awk '{ print $1 }' | xargs -I {} docker rm -f {} || true
done done
docker ps -a docker ps -a
'''.stripIndent()) '''.stripIndent())