ipv6 test case to de-coupling to fuel/compass
[yardstick.git] / docker / Makefile
1 ##############################################################################
2 # Copyright (c) 2015 Ericsson AB and others.
3 #
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
9
10 SHELL = /bin/bash
11
12 IMAGE = opnfv/yardstick
13
14 DOCKER_TAG = brahmaputra.0
15
16 .PHONY: all
17 all: .docker
18
19 .docker:
20         /usr/bin/docker build --rm=true --no-cache=true -t $(IMAGE):$(DOCKER_TAG) yardstick-ci
21         /usr/bin/docker tag -f $(IMAGE):$(DOCKER_TAG) $(IMAGE):latest
22         touch .docker
23
24
25 .PHONY: clean
26 clean:
27         @docker ps | grep $(IMAGE) | awk '{print $$1}' | xargs -r docker stop
28         @docker ps -a | grep $(IMAGE) | awk '{print $$1}' | xargs -r docker rm
29         @echo "Docker images to remove:"
30         @docker images | head -1 && docker images | grep $(IMAGE) || true
31         @image_tags=($$(docker images | grep $(IMAGE) | awk '{print $$2}')) ; \
32         for tag in "$${image_tags[@]}"; do \
33            echo "Removing docker image $(IMAGE):$$tag..." ; \
34            docker rmi $(IMAGE):$$tag ; \
35         done
36         rm -f .docker