forked from kubernetes/test-infra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
82 lines (63 loc) · 2.81 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Copyright 2017 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
PROJECT ?= k8s-prow-builds
ZONE ?= us-central1-f
CLUSTER ?= prow
NAMESPACE ?= test-pods
TAG = $(shell date +v%Y%m%d)-$(shell git describe --tags --always --dirty)
boskos:
go build k8s.io/test-infra/boskos/
client:
go build -o client/client k8s.io/test-infra/boskos/client/
reaper:
go build -o reaper/reaper k8s.io/test-infra/boskos/reaper/
janitor:
go build -o janitor/janitor k8s.io/test-infra/boskos/janitor/
metrics:
go build -o metrics/metrics k8s.io/test-infra/boskos/metrics/
server-image:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o boskos k8s.io/test-infra/boskos/
docker build -t "gcr.io/k8s-testimages/boskos:$(TAG)" .
docker push "gcr.io/k8s-testimages/boskos:$(TAG)"
rm boskos
reaper-image:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o reaper/reaper k8s.io/test-infra/boskos/reaper/
docker build -t "gcr.io/k8s-testimages/reaper:$(TAG)" reaper
docker push "gcr.io/k8s-testimages/reaper:$(TAG)"
rm reaper/reaper
janitor-image:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o janitor/janitor k8s.io/test-infra/boskos/janitor/
docker build --no-cache -t "gcr.io/k8s-testimages/janitor:$(TAG)" janitor
docker push "gcr.io/k8s-testimages/janitor:$(TAG)"
rm janitor/janitor
metrics-image:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o metrics/metrics k8s.io/test-infra/boskos/metrics/
docker build -t "gcr.io/k8s-testimages/metrics:$(TAG)" metrics
docker push "gcr.io/k8s-testimages/metrics:$(TAG)"
rm metrics/metrics
server-deployment:
kubectl apply -f deployment.yaml
reaper-deployment:
kubectl apply -f reaper/deployment.yaml
janitor-deployment:
kubectl apply -f janitor/deployment.yaml
metrics-deployment:
kubectl apply -f metrics/deployment.yaml
service:
kubectl apply -f service.yaml
update-config: get-cluster-credentials
kubectl create configmap resources --from-file=config=resources.json --dry-run -o yaml | kubectl --namespace="$(NAMESPACE)" replace configmap resources -f -
get-cluster-credentials:
gcloud container clusters get-credentials "$(CLUSTER)" --project="$(PROJECT)" --zone="$(ZONE)"
.PHONY: boskos client reaper janitor metrics server-image reaper-image janitor-image metrics-image server-deployment reaper-deployment janitor-deployment metrics-deployment service update-config get-cluster-credentials