-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (20 loc) · 765 Bytes
/
Makefile
File metadata and controls
26 lines (20 loc) · 765 Bytes
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
CONTROLLER_IMAGE = xychu/throttle-controller
CONTROLLER_TAG = v1
CONTROLLER_BIN = throttle
WEBHOOK_IMAGE = xychu/throttle-admission-webhook
WEBHOOK_TAG = v1
WEBHOOK_BIN = webhook
build-ctr:
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o $(CONTROLLER_BIN) .
docker build --no-cache -t $(CONTROLLER_IMAGE):$(CONTROLLER_TAG) .
rm -rf $(CONTROLLER_BIN)
push-ctr:
docker push $(CONTROLLER_IMAGE):$(CONTROLLER_TAG)
build-webhook:
cd webhook; CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o $(WEBHOOK_BIN) .
docker build --no-cache -t $(WEBHOOK_IMAGE):$(WEBHOOK_TAG) ./webhook/
rm -rf ./webhook/$(WEBHOOK_BIN)
push-webhook:
docker push $(WEBHOOK_IMAGE):$(WEBHOOK_TAG)
build-all: build-webhook build-ctr
push-all: push-webhook push-ctr