X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fqtip%2Fqtip-cleanup.sh;h=95babb318b916bd08e79367d29c4c3b30cd4fe9f;hb=5d573b1ddad47c0eddd3be9aab944bc26a885048;hp=b923aa2a83b3ee0bb0d33c21d14d66597b35fd69;hpb=e179ec5cdff82921b07dbb297fe51b82f19fd9f5;p=releng.git diff --git a/jjb/qtip/qtip-cleanup.sh b/jjb/qtip/qtip-cleanup.sh index b923aa2a8..95babb318 100644 --- a/jjb/qtip/qtip-cleanup.sh +++ b/jjb/qtip/qtip-cleanup.sh @@ -6,15 +6,12 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -echo "Cleaning up QTIP docker containers/images..." - # Remove previous running containers if exist if [[ ! -z $(docker ps -a | grep opnfv/qtip) ]]; then echo "Removing existing opnfv/qtip containers..." - running_containers=$(docker ps | grep opnfv/qtip | awk '{print $1}') - docker stop ${running_containers} - all_containers=$(docker ps -a | grep opnfv/qtip | awk '{print $1}') - docker rm ${all_containers} + # workaround: sometimes it throws an error when stopping qtip container. + # To make sure ci job unblocked, remove qtip container by force without stopping it. + docker rm -f $(docker ps -a | grep opnfv/qtip | awk '{print $1}') fi # Remove existing images if exist @@ -27,4 +24,3 @@ if [[ ! -z $(docker images | grep opnfv/qtip) ]]; then docker rmi opnfv/qtip:$tag done fi -