add random image name.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu 2016-05-09 17:03:02 +08:00
parent 80e1850017
commit 9a2459af06
1 changed files with 6 additions and 6 deletions

View File

@ -2,10 +2,10 @@
DEPS := $(wildcard *.go)
BUILD_IMAGE := "gorush-build"
TEST_IMAGE := "gorush-testing"
PRODUCTION_IMAGE := "gorush"
DEPLOY_ACCOUNT := "appleboy"
VERSION := $(shell git describe --tags)
TIMENAME := $(shell date '+%Y%m%d%H%M%S%s')
all: build
@ -38,11 +38,11 @@ docker_build: clean
docker build --rm -t $(PRODUCTION_IMAGE) -f docker/Dockerfile.dist .
docker_test:
-docker rm -f gorush-redis
@docker build --rm -t $(TEST_IMAGE) -f docker/Dockerfile.testing .
@docker run --name gorush-redis -d redis
@docker run --rm --link gorush-redis:redis -e ANDROID_TEST_TOKEN=$(ANDROID_TEST_TOKEN) -e ANDROID_API_KEY=$(ANDROID_API_KEY) $(TEST_IMAGE) sh -c "make test"
@docker rm -f gorush-redis
@docker build --rm -t $(TIMENAME)-test -f docker/Dockerfile.testing .
@docker run --name $(TIMENAME)-redis -d redis
@docker run --rm --link $(TIMENAME)-redis:redis -e ANDROID_TEST_TOKEN=$(ANDROID_TEST_TOKEN) -e ANDROID_API_KEY=$(ANDROID_API_KEY) $(TIMENAME)-test sh -c "make test"
@docker rm -f $(TIMENAME)-redis
@docker rmi -f $(TIMENAME)-test
deploy:
ifeq ($(tag),)