forked from deis/dockerbuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (38 loc) · 1.31 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
# Short name: Short name, following [a-zA-Z_], used all over the place.
# Some uses for short name:
# - Docker image name
# - Kubernetes service, rc, pod, secret, volume names
SHORT_NAME := dockerbuilder
# Enable vendor/ directory support.
export GO15VENDOREXPERIMENT=1
# Common flags passed into Go's linker.
LDFLAGS := "-s -X main.version=${VERSION}"
# Docker Root FS
BINDIR := ./rootfs
# Legacy support for DEV_REGISTRY, plus new support for DEIS_REGISTRY.
DEV_REGISTRY ?= $(eval docker-machine ip deis):5000
DEIS_REGISTY ?= ${DEV_REGISTRY}/
IMAGE_PREFIX ?= deis
include versioning.mk
all:
@echo "Use a Makefile to control top-level building of the project."
# For cases where we're building from local
docker-build:
docker build --rm -t ${IMAGE} rootfs
docker tag -f ${IMAGE} ${MUTABLE_IMAGE}
# Deploy is a Kubernetes-oriented target
deploy: kube-service kube-rc
# Some things, like services, have to be deployed before pods. This is an
# example target. Others could perhaps include kube-secret, kube-volume, etc.
kube-service:
kubectl create -f ${SVC}
# When possible, we deploy with RCs.
kube-rc:
kubectl create -f ${RC}
kube-clean:
kubectl delete rc deis-example
bootstrap:
@echo Nothing to do.
test:
@echo "Implement functional tests in _tests directory"
.PHONY: all build docker-compile kube-up kube-down deploy