-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
71 lines (50 loc) · 1.62 KB
/
Makefile
File metadata and controls
71 lines (50 loc) · 1.62 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
include ../includes.mk
COMPONENT := logspout
DOCKER_IMAGE := deis/$(COMPONENT)
BUILD_IMAGE := $(DOCKER_IMAGE)-build
RELEASE_IMAGE := $(DOCKER_IMAGE):$(BUILD_TAG)
DEV_DOCKER_IMAGE := $(DEV_REGISTRY)/$(RELEASE_IMAGE)
build: check-docker
docker build -t $(BUILD_IMAGE) .
docker cp `docker run -d $(BUILD_IMAGE)`:/go/bin/logspout image/
docker build -t $(RELEASE_IMAGE) image
rm -rf image/logspout
clean: check-docker check-registry
docker rmi $(RELEASE_IMAGE) $(BUILD_IMAGE)
full-clean: check-docker check-registry
docker images -q $(DOCKER_IMAGE) | xargs docker rmi -f
docker images -q $(BUILD_IMAGE) | xargs docker rmi -f
docker images -q $(DEV_DOCKER_IMAGE) | xargs docker rmi -f
install: check-deisctl
deisctl install $(COMPONENT)
uninstall: check-deisctl
deisctl uninstall $(COMPONENT)
start: check-deisctl
deisctl start $(COMPONENT)
stop: check-deisctl
deisctl stop $(COMPONENT)
restart: stop start
run: install start
dev-release: push set-image
push: check-registry
docker tag $(RELEASE_IMAGE) $(DEV_DOCKER_IMAGE)
docker push $(DEV_DOCKER_IMAGE)
set-image: check-deisctl
deisctl config $(COMPONENT) set image=$(DEV_DOCKER_IMAGE)
release:
docker push $(RELEASE_IMAGE)
deploy: build dev-release restart
test: test-unit test-functional
setup-root-gotools:
sudo GOPATH=/tmp/tmpGOPATH go get -u -v code.google.com/p/go.tools/cmd/cover
sudo GOPATH=/tmp/tmpGOPATH go get -u -v code.google.com/p/go.tools/cmd/vet
sudo rm -rf /tmp/tmpGOPATH
setup-gotools:
go get -v github.com/golang/lint/golint
test-style:
go vet -x ./...
-golint .
test-unit: test-style
@echo no tests
test-functional:
@echo no functional tests