11SHORT_NAME ?= builder
22
3+ include versioning.mk
4+
35# Enable vendor/ directory support.
46export GO15VENDOREXPERIMENT =1
57
@@ -12,21 +14,14 @@ DEV_ENV_CMD := ${DEV_ENV_PREFIX} ${DEV_ENV_IMAGE}
1214
1315# SemVer with build information is defined in the SemVer 2 spec, but Docker
1416# doesn't allow +, so we use -.
15- VERSION ?= git-$(shell git rev-parse --short HEAD)
1617BINARY_DEST_DIR := rootfs/usr/bin
1718# Common flags passed into Go's linker.
1819LDFLAGS := "-s -X main.version=${VERSION}"
19- IMAGE_PREFIX ?= deis
2020# Docker Root FS
2121BINDIR := ./rootfs
2222
2323DEIS_REGISTRY ?= ${DEV_REGISTRY}/
2424
25- # Kubernetes-specific information for RC, Service, and Image.
26- RC := manifests/deis-${SHORT_NAME}-rc.yaml
27- SVC := manifests/deis-${SHORT_NAME}-service.yaml
28- IMAGE := ${DEIS_REGISTRY}${IMAGE_PREFIX}/${SHORT_NAME}:${VERSION}
29-
3025all :
3126 @echo " Use a Makefile to control top-level building of the project."
3227
@@ -49,27 +44,12 @@ test:
4944
5045docker-build :
5146 docker build --rm -t ${IMAGE} rootfs
47+ docker tag -f ${IMAGE} ${MUTABLE_IMAGE}
5248
5349# Push to a registry that Kubernetes can access.
5450docker-push :
5551 docker push ${IMAGE}
5652
57- # Deploy is a Kubernetes-oriented target
58- deploy : kube-service kube-rc
59-
60- # Some things, like services, have to be deployed before pods. This is an
61- # example target. Others could perhaps include kube-secret, kube-volume, etc.
62- kube-service :
63- kubectl create -f ${SVC}
64-
65- # When possible, we deploy with RCs.
66- kube-rc :
67- kubectl create -f ${RC}
68-
69- kube-clean :
70- kubectl delete rc deis-${SHORT_NAME}
71- kubectl delete svc deis-${SHORT_NAME}
72-
7353.PHONY : all build docker-compile kube-up kube-down deploy
7454
7555define check-static-binary
0 commit comments