-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
21 lines (16 loc) · 970 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
IMAGE?=kameshsampath/kube-dev-tools
TAG?=latest
SHELL := bash
CURRENT_DIR = $(shell pwd)
ENV_FILE := $(CURRENT_DIR)/.envrc
BUILDER=buildx-multi-arch
prepare-buildx: ## Create buildx builder for multi-arch build, if not exists
docker buildx inspect $(BUILDER) || docker buildx create --name=$(BUILDER) --driver=docker-container --driver-opt=network=host
build-tools: prepare-buildx ## Build tools image locally
docker buildx build --builder=$(BUILDER) --cache-to="type=registry,ref=kameshsampath/kube-dev-tools-cache" --cache-from="type=registry,ref=kameshsampath/kube-dev-tools-cache" --output="type=docker" -t $(IMAGE):$(TAG) -f docker/Dockerfile .
release:
@drone exec --trusted --env-file=.env
help: ## Show this help
@echo Please specify a build target. The choices are:
@grep -E '^[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "$(INFO_COLOR)%-30s$(NO_COLOR) %s\n", $$1, $$2}'
.PHONY: bin build-plugin push-plugin help