Fix an error in docker volume remove 37/29637/1
authorAlex Yang <yangyang1@zte.com.cn>
Thu, 2 Mar 2017 12:20:01 +0000 (20:20 +0800)
committerAlex Yang <yangyang1@zte.com.cn>
Thu, 2 Mar 2017 12:20:01 +0000 (20:20 +0800)
Replace $containers_to_kill with $volumes_to_remove in docker
volumes removing.

Change-Id: I715ff135099be0a8c9424ab3f94509ee72558415
Signed-off-by: Alex Yang <yangyang1@zte.com.cn>
ci/build_rpm/build_rpms.sh

index 811eb13..db5a42e 100755 (executable)
@@ -40,7 +40,7 @@ function cleanup_container {
         echo "Removing containers... $containers_to_kill"
         (sudo docker rm -v -f ${containers_to_kill} 2>&1) > /dev/null
 
-        if [[ ! -z "$containers_to_kill" ]]; then
+        if [[ ! -z "$volumes_to_remove" ]]; then
             echo "Removing volumes... $volumes_to_remove"
             (sudo docker volume rm ${volumes_to_remove} 2>&1) || true > /dev/null
         fi