Update commonFunctions.groovy

Jenkinsfile: return true on removeStrandedContainers
This commit is contained in:
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

View File

@ -111,7 +111,7 @@ def removeStrandedContainers(removeTestingContainers) {
fi
for image in "${arr[@]}"
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
docker ps -a
'''.stripIndent())