aboutsummaryrefslogtreecommitdiffstats
path: root/ci/docker/Makefile
diff options
context:
space:
mode:
authorJo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com>2015-12-07 18:51:22 +0100
committerJörgen Karlsson <jorgen.w.karlsson@ericsson.com>2015-12-08 15:09:22 +0000
commit70c27f24d07411103fb63090d17390f5ea249ebc (patch)
tree8e831abdde3f7d0c3bc67b79e8358d0d120cb71f /ci/docker/Makefile
parent7dcceb89768b2ab2de9d88718978c850afd092dd (diff)
Docker image cleanup
- Renamed docker image 'opnfv/yardstick-ci' -> 'opnfv/yardstick' as recommended by project. - Added cirros image and releng repo to docker image in order to make it more usable in offline mode. - Renamed run_benchmarks to run_tests.sh - Moved some environment setups to a new file prepare_env.sh - Added daily test suites file for ericsson and LF pods. Docker image is now built and pushed by releng script: https://gerrit.opnfv.org/gerrit/gitweb?p=releng.git;a=blob;f=jjb/opnfv/opnfv-docker.sh The ci/docker/Makefile file is not used by releng to build yardstick image but the makefile can still be used to build and test docker images locally. Change-Id: If9d6740b39e91d145c587d8d5e2bd372d09a46a9 Signed-off-by: Jo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com>
Diffstat (limited to 'ci/docker/Makefile')
-rw-r--r--ci/docker/Makefile21
1 files changed, 15 insertions, 6 deletions
diff --git a/ci/docker/Makefile b/ci/docker/Makefile
index 81189960d..036d67db3 100644
--- a/ci/docker/Makefile
+++ b/ci/docker/Makefile
@@ -9,19 +9,28 @@
SHELL = /bin/bash
-IMAGE = opnfv/yardstick-ci
+IMAGE = opnfv/yardstick
+
+DOCKER_TAG = brahmaputra.0
.PHONY: all
all: .docker
.docker:
- /usr/bin/docker build --rm=true --no-cache=true -t $(IMAGE):14.04 yardstick-ci
- /usr/bin/docker tag -f $(IMAGE):14.04 $(IMAGE)
+ /usr/bin/docker build --rm=true --no-cache=true -t $(IMAGE):$(DOCKER_TAG) yardstick-ci
+ /usr/bin/docker tag -f $(IMAGE):$(DOCKER_TAG) $(IMAGE):latest
touch .docker
+
.PHONY: clean
clean:
- docker ps | grep $(IMAGE) | awk '{print $$1}' | xargs -r docker stop
- docker ps -a | grep $(IMAGE) | awk '{print $$1}' | xargs -r docker rm
- docker images -a | grep $(IMAGE) | awk '{print $$3}' | sort | uniq | xargs -r docker rmi
+ @docker ps | grep $(IMAGE) | awk '{print $$1}' | xargs -r docker stop
+ @docker ps -a | grep $(IMAGE) | awk '{print $$1}' | xargs -r docker rm
+ @echo "Docker images to remove:"
+ @docker images | head -1 && docker images | grep $(IMAGE) || true
+ @image_tags=($$(docker images | grep $(IMAGE) | awk '{print $$2}')) ; \
+ for tag in "$${image_tags[@]}"; do \
+ echo "Removing docker image $(IMAGE):$$tag..." ; \
+ docker rmi $(IMAGE):$$tag ; \
+ done
rm -f .docker