github.com/shashidharatd/test-infra@v0.0.0-20171006011030-71304e1ca560/boskos/Makefile (about) 1 # Copyright 2017 The Kubernetes Authors. 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 15 PROJECT ?= k8s-prow-builds 16 ZONE ?= us-central1-f 17 CLUSTER ?= prow 18 NAMESPACE ?= test-pods 19 20 TAG = $(shell date +v%Y%m%d)-$(shell git describe --tags --always --dirty) 21 22 boskos: 23 go build k8s.io/test-infra/boskos/ 24 25 client: 26 go build -o client/client k8s.io/test-infra/boskos/client/ 27 28 reaper: 29 go build -o reaper/reaper k8s.io/test-infra/boskos/reaper/ 30 31 janitor: 32 go build -o janitor/janitor k8s.io/test-infra/boskos/janitor/ 33 34 metrics: 35 go build -o metrics/metrics k8s.io/test-infra/boskos/metrics/ 36 37 server-image: 38 CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o boskos k8s.io/test-infra/boskos/ 39 docker build -t "gcr.io/k8s-testimages/boskos:$(TAG)" . 40 gcloud docker -- push "gcr.io/k8s-testimages/boskos:$(TAG)" 41 rm boskos 42 43 reaper-image: 44 CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o reaper/reaper k8s.io/test-infra/boskos/reaper/ 45 docker build -t "gcr.io/k8s-testimages/reaper:$(TAG)" reaper 46 gcloud docker -- push "gcr.io/k8s-testimages/reaper:$(TAG)" 47 rm reaper/reaper 48 49 janitor-image: 50 CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o janitor/janitor k8s.io/test-infra/boskos/janitor/ 51 docker build -t "gcr.io/k8s-testimages/janitor:$(TAG)" janitor 52 gcloud docker -- push "gcr.io/k8s-testimages/janitor:$(TAG)" 53 rm janitor/janitor 54 55 metrics-image: 56 CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o metrics/metrics k8s.io/test-infra/boskos/metrics/ 57 docker build -t "gcr.io/k8s-testimages/metrics:$(TAG)" metrics 58 gcloud docker -- push "gcr.io/k8s-testimages/metrics:$(TAG)" 59 rm metrics/metrics 60 61 server-deployment: 62 kubectl apply -f deployment.yaml 63 64 reaper-deployment: 65 kubectl apply -f reaper/deployment.yaml 66 67 janitor-deployment: 68 kubectl apply -f janitor/deployment.yaml 69 70 metrics-deployment: 71 kubectl apply -f metrics/deployment.yaml 72 73 service: 74 kubectl apply -f service.yaml 75 76 update-config: get-cluster-credentials 77 kubectl create configmap resources --from-file=config=resources.json --dry-run -o yaml | kubectl --namespace="$(NAMESPACE)" replace configmap resources -f - 78 79 get-cluster-credentials: 80 gcloud container clusters get-credentials "$(CLUSTER)" --project="$(PROJECT)" --zone="$(ZONE)" 81 82 .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