Merge pull request #371 from andrewhsu/clean

[19.03] Jenkinsfile: ensure all containers are cleaned up
This commit is contained in:
Andrew Hsu 2019-09-19 17:56:39 -07:00 committed by GitHub
commit 23c7134bad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

2
Jenkinsfile vendored
View File

@ -662,6 +662,8 @@ pipeline {
sh '''
echo "Ensuring container killed."
docker rm -vf docker-pr$BUILD_NUMBER || true
cids=$(docker ps -aq -f name=docker-pr${BUILD_NUMBER}-*)
[ -n "$cids" ] && docker rm -vf $cids || true
'''
sh '''