-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (33 loc) · 1.18 KB
/
Makefile
File metadata and controls
47 lines (33 loc) · 1.18 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
44
45
46
47
SHELL := /bin/bash
# all monitor components share/use the following targets/exports
BUILD_TAG ?= git-$(shell git rev-parse --short HEAD)
DRYCC_REGISTRY ?= ${DEV_REGISTRY}
IMAGE_PREFIX ?= drycc
PLATFORM ?= linux/amd64,linux/arm64
include versioning.mk
SHELL_SCRIPTS = $(wildcard rootfs/usr/local/bin/*)
DEV_ENV_IMAGE := ${DEV_REGISTRY}/drycc/go-dev
DEV_ENV_CMD := podman run --rm -v ${CURDIR}:${CURDIR} -w ${CURDIR} ${DEV_ENV_IMAGE}
build: podman-build
push: podman-push
deploy: podman-build podman-push
check-podman:
@if [ -z $$(which podman) ]; then \
echo "Missing \`podman\` client which is required for development"; \
exit 2; \
fi
podman-build:
podman build --build-arg CODENAME=${CODENAME} -t ${IMAGE} .
podman tag ${IMAGE} ${MUTABLE_IMAGE}
podman-buildx:
podman buildx build --build-arg CODENAME=${CODENAME} --platform ${PLATFORM} -t ${IMAGE} --push .
clean: check-podman
podman rmi $(IMAGE)
test: test-style
test-style:
${DEV_ENV_CMD} shellcheck $(SHELL_SCRIPTS)
.PHONY: build push podman-build clean deploy test
build-all:
podman build -t ${DRYCC_REGISTRY}/${IMAGE_PREFIX}/quickwit:${VERSION}
push-all:
podman push ${DRYCC_REGISTRY}/${IMAGE_PREFIX}/quickwit:${VERSION}