agones.dev/agones@v1.53.0/examples/allocation-endpoint/Makefile (about) 1 # Copyright 2022 Google LLC All Rights Reserved. 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 # 16 # Makefile for building a multi-cluster allocation proxy 17 # 18 19 # __ __ _ _ _ 20 # \ \ / /_ _ _ __(_) __ _| |__ | | ___ ___ 21 # \ \ / / _` | '__| |/ _` | '_ \| |/ _ \ __| 22 # \ V / (_| | | | | (_| | |_) | | __\__ \ 23 # \_/ \__,_|_| |_|\__,_|_.__/|_|\___|___/ 24 # 25 26 REPOSITORY ?= 27 PROD_REPO ?= us-docker.pkg.dev/agones-images/examples 28 29 # Directory that this Makefile is in. 30 mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) 31 project_path := $(dir $(mkfile_path)) 32 root_path = $(realpath $(project_path)/../..) 33 version := 0.14 34 ifeq ($(REPOSITORY),) 35 server_tag := allocation-endpoint-proxy:$(version) 36 else 37 server_tag := $(REPOSITORY)/allocation-endpoint-proxy:$(version) 38 endif 39 40 # _____ _ 41 # |_ _|_ _ _ __ __ _ ___| |_ ___ 42 # | |/ _` | '__/ _` |/ _ \ __/ __| 43 # | | (_| | | | (_| | __/ |_\__ \ 44 # |_|\__,_|_| \__, |\___|\__|___/ 45 # |___/ 46 47 # build the allocation endpoint proxy binary 48 build: 49 cd $(project_path)/server/ && docker build --tag=$(server_tag) . 50 51 run: 52 docker run --network=host $(PROD_REPO)/$(server_tag) $(args) 53 54 # check if hosted on Google Artifact Registry 55 gar-check: 56 gcloud container images describe $(PROD_REPO)/$(server_tag) 57 58 #output the tag for this image 59 echo-image-tag: 60 @echo $(PROD_REPO)/$(server_tag) 61 62 # Push the docker image 63 push: build 64 docker push $(server_tag) 65 66 # build and push the allocation-endpoint image with specified tag 67 cloud-build: 68 gcloud builds submit --config=cloudbuild.yaml