forked from deis/deis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
54 lines (37 loc) · 1.17 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
include ../includes.mk
DOCKER_IMAGE := deis/publisher
BUILD_IMAGE := $(DOCKER_IMAGE)-build
RELEASE_IMAGE := $(DOCKER_IMAGE):$(BUILD_TAG)
REMOTE_IMAGE := $(REGISTRY)/$(RELEASE_IMAGE)
build: check-docker
docker build -t $(BUILD_IMAGE) .
docker cp `docker run -d $(BUILD_IMAGE)`:/go/bin/publisher image/
docker build -t $(RELEASE_IMAGE) image
rm -rf image/publisher
clean: check-docker check-registry
docker rmi $(RELEASE_IMAGE) $(REMOTE_IMAGE)
full-clean: check-docker check-registry
docker images -q $(DOCKER_IMAGE) | xargs docker rmi -f
docker images -q $(REGISTRY)/$(DOCKER_IMAGE) | xargs docker rmi -f
install: check-deisctl
deisctl install publisher
dev-release: push set-image
push: check-registry
docker tag $(RELEASE_IMAGE) $(REMOTE_IMAGE)
docker push $(REMOTE_IMAGE)
set-image: check-deisctl
deisctl config publisher set image=$(REMOTE_IMAGE)
release: check-docker
docker push $(DOCKER_IMAGE)
deploy: build dev-release restart
restart: stop start
run: install start
start: check-deisctl
deisctl start publisher
stop: check-deisctl
deisctl stop publisher
test: test-unit
test-unit:
godep go test -v ./...
uninstall: check-deisctl
deisctl uninstall publisher