-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
34 lines (26 loc) · 1.05 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
# 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 := redis
HEPHY_REGISTY ?= ${DEV_REGISTRY}/
IMAGE_PREFIX ?= hephy
include versioning.mk
SHELL_SCRIPTS = $(wildcard _scripts/*.sh) rootfs/bin/boot
# The following variables describe the containerized development environment
# and other build options
DEV_ENV_IMAGE := hephy/go-dev:v1.28.3
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: docker-build docker-push
dev:
${DEV_ENV_CMD_INT} bash
# For cases where we're building from local
# We also alter the RC file to set the image name.
docker-build:
docker build ${DOCKER_BUILD_FLAGS} -t ${IMAGE} rootfs
docker tag ${IMAGE} ${MUTABLE_IMAGE}
test: test-style
test-style:
${DEV_ENV_CMD} shellcheck $(SHELL_SCRIPTS)