-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathMakefile
66 lines (45 loc) · 1.89 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
55
56
57
58
59
60
61
62
63
64
65
66
SHORT_NAME := slugrunner
export GO15VENDOREXPERIMENT=1
IMAGE_PREFIX ?= deis
include versioning.mk
SHELL_SCRIPTS = $(wildcard rootfs/bin/*) $(wildcard rootfs/runner/*) $(wildcard _scripts/*.sh)
# The following variables describe the containerized development environment
# and other build options
DEV_ENV_IMAGE := quay.io/deis/go-dev:0.20.0
DEV_ENV_WORK_DIR := /go/src/${REPO_PATH}
DEV_ENV_CMD := docker run --rm -v ${CURDIR}:${DEV_ENV_WORK_DIR} -w ${DEV_ENV_WORK_DIR} ${DEV_ENV_IMAGE}
DEV_ENV_CMD_INT := docker run -it --rm -v ${CURDIR}:${DEV_ENV_WORK_DIR} -w ${DEV_ENV_WORK_DIR} ${DEV_ENV_IMAGE}
all: build docker-build docker-push
bootstrap:
@echo Nothing to do.
docker-build:
docker build ${DOCKER_BUILD_FLAGS} -t ${IMAGE} rootfs
docker tag ${IMAGE} ${MUTABLE_IMAGE}
deploy: docker-build docker-push kube-pod
kube-pod: kube-service
kubectl create -f ${POD}
kube-secrets:
- kubectl -s http://172.17.8.102:8080 create -f ${SEC}
secrets:
perl -pi -e "s|access-key-id: .+|access-key-id: ${key}|g" ${SEC}
perl -pi -e "s|access-secret-key: .+|access-secret-key: ${secret}|g" ${SEC}
echo ${key} ${secret}
kube-service: kube-secrets
- kubectl create -f ${SVC}
- kubectl create -f manifests/deis-minio-secretUser.yaml
kube-clean:
- kubectl delete rc deis-${SHORT_NAME}-rc
kube-mc:
kubectl create -f manifests/deis-mc-pod.yaml
mc:
docker build ${DOCKER_BUILD_FLAGS} -t ${DEIS_REGISTRY}/deis/minio-mc:latest mc
docker push ${DEIS_REGISTRY}/deis/minio-mc:latest
perl -pi -e "s|image: [a-z0-9.:]+\/|image: ${DEIS_REGISTRY}/|g" manifests/deis-mc-pod.yaml
test: test-style test-unit test-functional
test-unit:
@echo "Implement unit tests in _tests directory"
test-functional:
@echo "Implement functional tests in _tests directory"
test-style:
${DEV_ENV_CMD} shellcheck $(SHELL_SCRIPTS)
.PHONY: all bootstrap build docker-compile kube-up kube-down deploy mc kube-mc test test-style test-unit test-functional