diff options
author | Jo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com> | 2015-10-14 14:41:41 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@172.30.200.206> | 2015-10-14 14:41:41 +0000 |
commit | a1378b700a9234e7fcbf77c7890030b306bc65ea (patch) | |
tree | d8e1b3bfdf484399d4d4aa572612c635fe3e05ea /ci/docker/Makefile | |
parent | 3bca848a141ba2728d036a1423b514027b0e4b98 (diff) | |
parent | d03858bbac357b6d705c7137d2d20d5c8e34ecc6 (diff) |
Merge "Docker container for Yardstick CI"
Diffstat (limited to 'ci/docker/Makefile')
-rw-r--r-- | ci/docker/Makefile | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ci/docker/Makefile b/ci/docker/Makefile new file mode 100644 index 000000000..81189960d --- /dev/null +++ b/ci/docker/Makefile @@ -0,0 +1,27 @@ +############################################################################## +# Copyright (c) 2015 Ericsson AB and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +SHELL = /bin/bash + +IMAGE = opnfv/yardstick-ci + +.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) + 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 + rm -f .docker |