summaryrefslogtreecommitdiffstats
path: root/jjb/qtip/qtip-cleanup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/qtip/qtip-cleanup.sh')
-rw-r--r--jjb/qtip/qtip-cleanup.sh10
1 files changed, 3 insertions, 7 deletions
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
-