-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdefault.mk
More file actions
43 lines (31 loc) · 1.26 KB
/
default.mk
File metadata and controls
43 lines (31 loc) · 1.26 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
SHELL := /bin/bash
# all monitor components share/use the following targets/exports
DOCKER_HOST = $(shell echo $$DOCKER_HOST)
BUILD_TAG ?= git-$(shell git rev-parse --short HEAD)
DRYCC_REGISTRY ?= ${DEV_REGISTRY}
IMAGE_PREFIX ?= drycc
PLATFORM ?= linux/amd64,linux/arm64
include ../includes.mk
include ../versioning.mk
include ../deploy.mk
TEST_ENV_PREFIX := docker run --rm -v ${CURDIR}:/bash -w /bash ${DEV_REGISTRY}/drycc/go-dev
build: docker-build
push: docker-push
deploy: check-kubectl docker-build docker-push install
docker-build:
docker build ${DOCKER_BUILD_FLAGS} -t ${IMAGE} rootfs
docker tag ${IMAGE} ${MUTABLE_IMAGE}
docker-buildx:
docker buildx build --platform ${PLATFORM} -t ${IMAGE} rootfs --push
clean: check-docker
docker rmi $(IMAGE)
test: test-style
test-style:
${TEST_ENV_PREFIX} shellcheck $(SHELL_SCRIPTS)
.PHONY: build push docker-build clean upgrade deploy test test-style
build-all:
docker build ${DOCKER_BUILD_FLAGS} -t ${DRYCC_REGISTRY}/${IMAGE_PREFIX}/grafana:${VERSION} ../grafana/rootfs
docker build ${DOCKER_BUILD_FLAGS} -t ${DRYCC_REGISTRY}/${IMAGE_PREFIX}/telegraf:${VERSION} ../telegraf/rootfs
push-all:
docker push ${DRYCC_REGISTRY}/${IMAGE_PREFIX}/grafana:${VERSION}
docker push ${DRYCC_REGISTRY}/${IMAGE_PREFIX}/telegraf:${VERSION}