summaryrefslogtreecommitdiffstats
path: root/jjb/yardstick/yardstick-cleanup.sh
AgeCommit message (Collapse)AuthorFilesLines
2017-09-11yardstick-cleanup.sh: try to fix docker rmi failureRoss Brattain1-13/+13
apex builds seem to be failing to remove the yardstick containers https://build.opnfv.org/ci/job/yardstick-apex-baremetal-daily-master/400/console [yardstick-apex-baremetal-daily-master] $ /bin/bash /tmp/hudson8974425724638109512.sh Cleaning up docker containers/images... Docker images to remove: REPOSITORY TAG IMAGE ID CREATED SIZE opnfv/yardstick latest 5b83d8e60fb7 6 days ago 1.84GB Removing docker image opnfv/yardstick:latest... Error response from daemon: No such image: opnfv/yardstick:latest Build step 'Execute shell' marked build as failure For some reason we can't remove the yardstick container. Try instead to remove based on ID Replace grep | awk with just awk. Also fixed shellcheck warnings: In jjb/yardstick/yardstick-cleanup.sh line 6: if [[ -n ${dangling_images} ]]; then ^-- SC2128: Expanding an array without an index only gives the first element. In jjb/yardstick/yardstick-cleanup.sh line 10: containers=$(docker ps -a | grep $image_id | awk '{print $1}') ^-- SC2086: Double quote to prevent globbing and word splitting. In jjb/yardstick/yardstick-cleanup.sh line 12: docker rm -f $containers >${redirect} ^-- SC2086: Double quote to prevent globbing and word splitting. In jjb/yardstick/yardstick-cleanup.sh line 14: docker rmi $image_id >${redirect} ^-- SC2086: Double quote to prevent globbing and word splitting. In jjb/yardstick/yardstick-cleanup.sh line 20: if [[ ! -z $(docker ps -a | grep opnfv/yardstick) ]]; then ^-- SC2143: Use ! grep -q instead of comparing output with [ -z .. ]. In jjb/yardstick/yardstick-cleanup.sh line 27: if [[ ! -z $(docker images | grep opnfv/yardstick) ]]; then ^-- SC2143: Use ! grep -q instead of comparing output with [ -z .. ]. In jjb/yardstick/yardstick-cleanup.sh line 33: docker rmi opnfv/yardstick:$tag >$redirect ^-- SC2086: Double quote to prevent globbing and word splitting. Change-Id: I6545ac7f568161e5620e31d487faf70fa21da075 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
2017-03-24Use docker image id instead of tag to remove yardstick Docker image with ↵JingLu51-1/+15
tag:<None> JIRA: RELENG-194 Now, in CI, bottlenecks job will pull yardstick Docker image again, which may cause the tag of the Docker image previous used by Yardstick changed to 'None'. Using 'None' tag to remove Docker image will cause error. Change-Id: I5c63c6c515ede5da4f6a40be6bb22fa6771f8f09 Signed-off-by: JingLu5 <lvjing5@huawei.com>
2016-05-24yardstick: Take builders out of jjbFatih Degirmenci1-0/+22
Change-Id: I246bcdd9f1fa300639bd7ec744cefe82e293b222 Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>