-
Notifications
You must be signed in to change notification settings - Fork 18
/
Makefile
44 lines (29 loc) · 1.09 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
ARCH ?=amd64
ALL_ARCH = amd64 arm64
IMAGE ?= docker.io/rancher/hyperkube-base
TAG ?= v0.0.1
BASEIMAGE ?= ubuntu:22.04
IPTWI_VERSION ?= v2
TEMP_DIR:=$(shell mktemp -d)
all: all-push
sub-build-%:
$(MAKE) ARCH=$* build
all-build: $(addprefix sub-build-,$(ALL_ARCH))
sub-push-image-%:
$(MAKE) ARCH=$* push
all-push-images: $(addprefix sub-push-image-,$(ALL_ARCH))
all-push: all-push-images push-manifest
scripts/iptables-wrapper-installer.sh:
mkdir -p scripts/
cd scripts/ && curl -sSLO --retry 5 https://raw.githubusercontent.com/kubernetes-sigs/iptables-wrappers/${IPTWI_VERSION}/iptables-wrapper-installer.sh && chmod +x iptables-wrapper-installer.sh
clean:
rm -f scripts/iptables-wrapper-installer.sh
build: clean scripts/iptables-wrapper-installer.sh
docker build --pull --build-arg ARCH=${ARCH} -t $(IMAGE):$(TAG)-linux-$(ARCH) .
push: build
docker push $(IMAGE):$(TAG)-$(ARCH)
test: clean scripts/iptables-wrapper-installer.sh
IMAGE=test-hyperkube-base DEBUG=true \
./tests/run-wrapper-tests.sh bci
.PHONY: all build push clean all-build all-push-images all-push
.DEFAULT_GOAL := build