From 9355e2b28d5a114cbcc70706fd905ca27096c9f9 Mon Sep 17 00:00:00 2001 From: Kalaiselvi Murugesan Date: Tue, 25 Jul 2023 23:03:22 +0000 Subject: [PATCH 1/6] cloud build script for xonotic --- examples/xonotic/Makefile | 16 ++++++---- examples/xonotic/cloudbuild.yaml | 54 ++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 6 deletions(-) create mode 100644 examples/xonotic/cloudbuild.yaml diff --git a/examples/xonotic/Makefile b/examples/xonotic/Makefile index c99dc0ef8f..91c8c512b6 100644 --- a/examples/xonotic/Makefile +++ b/examples/xonotic/Makefile @@ -23,12 +23,12 @@ # \_/ \__,_|_| |_|\__,_|_.__/|_|\___|___/ # -REPOSITORY = us-docker.pkg.dev/agones-images/examples +REPOSITORY ?= mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) project_path := $(dir $(mkfile_path)) root_path := $(realpath $(project_path)/../..) -image_tag = $(REPOSITORY)/xonotic-example:1.1 +image_tag = xonotic-example:1.1 # _____ _ # |_ _|_ _ _ __ __ _ ___| |_ ___ @@ -39,16 +39,20 @@ image_tag = $(REPOSITORY)/xonotic-example:1.1 # Build a docker image for the server, and tag it build: - docker build -f $(project_path)/Dockerfile --tag=$(image_tag) . + docker build -f $(project_path)/Dockerfile --tag=$(REPOSITORY)/$(image_tag) . # Push a docker image to the repository, and save it push: build - docker push $(image_tag) + docker push $(REPOSITORY)/$(image_tag) # check if hosted on Google Artifact Registry gar-check: - gcloud container images describe $(image_tag) + gcloud container images describe $(REPOSITORY)/$(image_tag) #output the tag for this image echo-image-tag: - @echo $(image_tag) + @echo $(REPOSITORY)/$(image_tag) + +# build and push the xonotic image with specified tag +cloud-build: + gcloud builds submit --config=cloudbuild.yaml --substitutions=_IMAGE_TAG=$(image_tag) diff --git a/examples/xonotic/cloudbuild.yaml b/examples/xonotic/cloudbuild.yaml new file mode 100644 index 0000000000..b63d144818 --- /dev/null +++ b/examples/xonotic/cloudbuild.yaml @@ -0,0 +1,54 @@ +# Copyright 2023 Google LLC +# +# 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. + +steps: + + # + # Creates the initial make + docker build platform + # + - name: "ubuntu" + args: + - "bash" + - "-c" + - "echo 'FROM gcr.io/cloud-builders/docker\nRUN apt-get install make\nENTRYPOINT [\"/usr/bin/make\"]' > Dockerfile.build" + waitFor: ["-"] + + - name: gcr.io/cloud-builders/docker + id: build-make-docker + args: ["build", "-f", "Dockerfile.build", "-t", "make-docker", "."] + + # build xonotic image to GCR + - name: make-docker + id: build + dir: "." + env: + - REPOSITORY=${_REPOSITORY} + - IMAGE_TAG=${_IMAGE_TAG} + - DOCKER_RUN_ARGS=--network=cloudbuild + args: ["-j", "1", "build"] + + # push xonotic image to GCR + - name: "make-docker" + id: push + waitFor: + - build + dir: "." + env: + - REPOSITORY=${_REPOSITORY} + - IMAGE_TAG=${_IMAGE_TAG} + args: ["-j", "1", "push"] + +substitutions: + _REPOSITORY: 'us-docker.pkg.dev/agones-images/examples' +timeout: 1800s From e25a9b720c56e626e751f271fb43b2d2b177e391 Mon Sep 17 00:00:00 2001 From: Kalaiselvi Murugesan Date: Wed, 26 Jul 2023 03:46:26 +0000 Subject: [PATCH 2/6] suggested changes --- examples/xonotic/Makefile | 17 +++++++++++------ examples/xonotic/cloudbuild.yaml | 5 +---- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/examples/xonotic/Makefile b/examples/xonotic/Makefile index 91c8c512b6..5cc4818906 100644 --- a/examples/xonotic/Makefile +++ b/examples/xonotic/Makefile @@ -24,11 +24,16 @@ # REPOSITORY ?= +PROD_REPO ?= us-docker.pkg.dev/agones-images/examples mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) project_path := $(dir $(mkfile_path)) root_path := $(realpath $(project_path)/../..) -image_tag = xonotic-example:1.1 +ifeq ($(REPOSITORY),) + image_tag := xonotic-example:1.1 +else + image_tag := $(PROD_REPO)/xonotic-example:1.1 +endif # _____ _ # |_ _|_ _ _ __ __ _ ___| |_ ___ @@ -39,20 +44,20 @@ image_tag = xonotic-example:1.1 # Build a docker image for the server, and tag it build: - docker build -f $(project_path)/Dockerfile --tag=$(REPOSITORY)/$(image_tag) . + docker build -f $(project_path)/Dockerfile --tag=$(image_tag) . # Push a docker image to the repository, and save it push: build - docker push $(REPOSITORY)/$(image_tag) + docker push $(image_tag) # check if hosted on Google Artifact Registry gar-check: - gcloud container images describe $(REPOSITORY)/$(image_tag) + gcloud container images describe $(image_tag) #output the tag for this image echo-image-tag: - @echo $(REPOSITORY)/$(image_tag) + @echo $(image_tag) # build and push the xonotic image with specified tag cloud-build: - gcloud builds submit --config=cloudbuild.yaml --substitutions=_IMAGE_TAG=$(image_tag) + gcloud builds submit --config=cloudbuild.yaml diff --git a/examples/xonotic/cloudbuild.yaml b/examples/xonotic/cloudbuild.yaml index b63d144818..29375bd368 100644 --- a/examples/xonotic/cloudbuild.yaml +++ b/examples/xonotic/cloudbuild.yaml @@ -34,8 +34,6 @@ steps: dir: "." env: - REPOSITORY=${_REPOSITORY} - - IMAGE_TAG=${_IMAGE_TAG} - - DOCKER_RUN_ARGS=--network=cloudbuild args: ["-j", "1", "build"] # push xonotic image to GCR @@ -46,9 +44,8 @@ steps: dir: "." env: - REPOSITORY=${_REPOSITORY} - - IMAGE_TAG=${_IMAGE_TAG} args: ["-j", "1", "push"] substitutions: - _REPOSITORY: 'us-docker.pkg.dev/agones-images/examples' + _REPOSITORY: us-docker.pkg.dev/${PROJECT_ID}/examples timeout: 1800s From c8a72474f652ca8706e5ecac464996878842904d Mon Sep 17 00:00:00 2001 From: Kalaiselvi Murugesan Date: Wed, 26 Jul 2023 21:39:49 +0000 Subject: [PATCH 3/6] Included prod_repo variable and added script block in cloudbuild file --- examples/xonotic/Makefile | 6 +++--- examples/xonotic/cloudbuild.yaml | 23 +++++++++++++---------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/examples/xonotic/Makefile b/examples/xonotic/Makefile index 5cc4818906..01b8dd426c 100644 --- a/examples/xonotic/Makefile +++ b/examples/xonotic/Makefile @@ -32,7 +32,7 @@ root_path := $(realpath $(project_path)/../..) ifeq ($(REPOSITORY),) image_tag := xonotic-example:1.1 else - image_tag := $(PROD_REPO)/xonotic-example:1.1 + image_tag := $(REPOSITORY)/xonotic-example:1.1 endif # _____ _ @@ -52,11 +52,11 @@ push: build # check if hosted on Google Artifact Registry gar-check: - gcloud container images describe $(image_tag) + gcloud container images describe $(PROD_REPO)/$(image_tag) #output the tag for this image echo-image-tag: - @echo $(image_tag) + @echo $(PROD_REPO)/$(image_tag) # build and push the xonotic image with specified tag cloud-build: diff --git a/examples/xonotic/cloudbuild.yaml b/examples/xonotic/cloudbuild.yaml index 29375bd368..4c5ca151c1 100644 --- a/examples/xonotic/cloudbuild.yaml +++ b/examples/xonotic/cloudbuild.yaml @@ -13,29 +13,27 @@ # limitations under the License. steps: - # # Creates the initial make + docker build platform # - name: "ubuntu" - args: - - "bash" - - "-c" - - "echo 'FROM gcr.io/cloud-builders/docker\nRUN apt-get install make\nENTRYPOINT [\"/usr/bin/make\"]' > Dockerfile.build" - waitFor: ["-"] + script: | + echo 'FROM gcr.io/cloud-builders/docker\nRUN apt-get install make\nENTRYPOINT [\"/usr/bin/make\"]' > Dockerfile.build - name: gcr.io/cloud-builders/docker id: build-make-docker + entrypoint: "docker" args: ["build", "-f", "Dockerfile.build", "-t", "make-docker", "."] # build xonotic image to GCR - - name: make-docker + - name: "make-docker" id: build dir: "." env: - REPOSITORY=${_REPOSITORY} - args: ["-j", "1", "build"] - + script: | + make -j 1 build + # push xonotic image to GCR - name: "make-docker" id: push @@ -44,7 +42,12 @@ steps: dir: "." env: - REPOSITORY=${_REPOSITORY} - args: ["-j", "1", "push"] + script: | + make -j 1 push + +options: + machineType: E2_HIGHCPU_32 + dynamic_substitutions: true substitutions: _REPOSITORY: us-docker.pkg.dev/${PROJECT_ID}/examples From 92b3edf7752505c2d8d9b69b09f9c3b112d0946b Mon Sep 17 00:00:00 2001 From: Kalaiselvi Murugesan Date: Thu, 27 Jul 2023 02:36:16 +0000 Subject: [PATCH 4/6] Cloud Build: Build & Push some of example images with targeted Build --- examples/allocation-endpoint/Makefile | 20 ++++++++++++++------ examples/autoscaler-webhook/Makefile | 17 +++++++++++++---- examples/{xonotic => }/cloudbuild.yaml | 0 examples/crd-client/Makefile | 18 ++++++++++++++---- examples/supertuxkart/Makefile | 18 ++++++++++++++---- examples/xonotic/Makefile | 2 +- 6 files changed, 56 insertions(+), 19 deletions(-) rename examples/{xonotic => }/cloudbuild.yaml (100%) diff --git a/examples/allocation-endpoint/Makefile b/examples/allocation-endpoint/Makefile index 2cc1cf03ae..5d62eed485 100644 --- a/examples/allocation-endpoint/Makefile +++ b/examples/allocation-endpoint/Makefile @@ -22,14 +22,18 @@ # \ V / (_| | | | | (_| | |_) | | __\__ \ # \_/ \__,_|_| |_|\__,_|_.__/|_|\___|___/ # - -REPOSITORY = us-docker.pkg.dev/agones-images/examples +REPOSITORY ?= +PROD_REPO ?= us-docker.pkg.dev/agones-images/examples # Directory that this Makefile is in. mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) project_path := $(dir $(mkfile_path)) -server_tag = $(REPOSITORY)/allocation-endpoint-proxy:0.5 root_path = $(realpath $(project_path)/../..) +ifeq ($(REPOSITORY),) + server_tag := allocation-endpoint-proxy:0.5 +else + server_tag = $(REPOSITORY)/allocation-endpoint-proxy:0.5 +endif # _____ _ # |_ _|_ _ _ __ __ _ ___| |_ ___ @@ -43,16 +47,20 @@ build: cd $(project_path)/server/ && docker build --tag=$(server_tag) . run: - docker run --network=host $(server_tag) $(args) + docker run --network=host $(PROD_REPO)/$(server_tag) $(args) # check if hosted on Google Artifact Registry gar-check: - gcloud container images describe $(server_tag) + gcloud container images describe $(PROD_REPO)/$(server_tag) #output the tag for this image echo-image-tag: - @echo $(server_tag) + @echo $(PROD_REPO)/$(server_tag) # Push the docker image push: build docker push $(server_tag) + +# build and push the allocation-endpoint image with specified tag +cloud-build: + gcloud builds submit --config=../cloudbuild.yaml \ No newline at end of file diff --git a/examples/autoscaler-webhook/Makefile b/examples/autoscaler-webhook/Makefile index ca0bf60277..22d3b68d42 100644 --- a/examples/autoscaler-webhook/Makefile +++ b/examples/autoscaler-webhook/Makefile @@ -23,12 +23,17 @@ # \_/ \__,_|_| |_|\__,_|_.__/|_|\___|___/ # -REPOSITORY = us-docker.pkg.dev/agones-images/examples +REPOSITORY ?= +PROD_REPO ?= us-docker.pkg.dev/agones-images/examples mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) project_path := $(dir $(mkfile_path)) -autoscaler_webhook_tag = $(REPOSITORY)/autoscaler-webhook:0.7 root_path = $(realpath $(project_path)/../..) +ifeq ($(REPOSITORY),) + autoscaler_webhook_tag := autoscaler-webhook:0.7 +else + autoscaler_webhook_tag = $(REPOSITORY)/autoscaler-webhook:0.7 +endif # _____ _ # |_ _|_ _ _ __ __ _ ___| |_ ___ @@ -47,8 +52,12 @@ push: build # check if hosted on Google Artifact Registry gar-check: - gcloud container images describe $(autoscaler_webhook_tag) + gcloud container images describe $(PROD_REPO)/$(autoscaler_webhook_tag) #output the tag for this image echo-image-tag: - @echo $(autoscaler_webhook_tag) + @echo $(PROD_REPO)/$(autoscaler_webhook_tag) + +# build and push the autoscaler-webhook image with specified tag +cloud-build: + gcloud builds submit --config=../cloudbuild.yaml diff --git a/examples/xonotic/cloudbuild.yaml b/examples/cloudbuild.yaml similarity index 100% rename from examples/xonotic/cloudbuild.yaml rename to examples/cloudbuild.yaml diff --git a/examples/crd-client/Makefile b/examples/crd-client/Makefile index 951a0a0f50..c80d09e21e 100644 --- a/examples/crd-client/Makefile +++ b/examples/crd-client/Makefile @@ -23,9 +23,14 @@ # \_/ \__,_|_| |_|\__,_|_.__/|_|\___|___/ # -REPOSITORY ?= us-docker.pkg.dev/agones-images/examples +REPOSITORY ?= +PROD_REPO ?= us-docker.pkg.dev/agones-images/examples -server_tag = $(REPOSITORY)/crd-client:0.10 +ifeq ($(REPOSITORY),) + server_tag := crd-client:0.10 +else + server_tag = $(REPOSITORY)/crd-client:0.10 +endif # _____ _ # |_ _|_ _ _ __ __ _ ___| |_ ___ @@ -43,8 +48,13 @@ push: build # check if hosted on Google Artifact Registry gar-check: - gcloud container images describe $(server_tag) + gcloud container images describe $(PROD_REPO)/$(server_tag) #output the tag for this image echo-image-tag: - @echo $(server_tag) + @echo $(PROD_REPO)/$(server_tag) + +# build and push the autoscaler-webhook image with specified tag +cloud-build: + gcloud builds submit --config=../cloudbuild.yaml + diff --git a/examples/supertuxkart/Makefile b/examples/supertuxkart/Makefile index 0318d99f77..ddbdc0aa5e 100644 --- a/examples/supertuxkart/Makefile +++ b/examples/supertuxkart/Makefile @@ -23,11 +23,17 @@ # \_/ \__,_|_| |_|\__,_|_.__/|_|\___|___/ # -REPOSITORY = us-docker.pkg.dev/agones-images/examples +REPOSITORY ?= +PROD_REPO ?= us-docker.pkg.dev/agones-images/examples mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) project_path := $(dir $(mkfile_path)) -image_tag = $(REPOSITORY)/supertuxkart-example:0.8 + +ifeq ($(REPOSITORY),) + image_tag := supertuxkart-example:0.8 +else + image_tag = $(REPOSITORY)/supertuxkart-example:0.8 +endif # _____ _ # |_ _|_ _ _ __ __ _ ___| |_ ___ @@ -50,8 +56,12 @@ test: # check if hosted on Google Artifact Registry gar-check: - gcloud container images describe $(image_tag) + gcloud container images describe $(PROD_REPO)/$(image_tag) #output the tag for this image echo-image-tag: - @echo $(image_tag) + @echo $(PROD_REPO)/$(image_tag) + +# build and push the autoscaler-webhook image with specified tag +cloud-build: + gcloud builds submit --config=../cloudbuild.yaml diff --git a/examples/xonotic/Makefile b/examples/xonotic/Makefile index 01b8dd426c..8f5b7d64d9 100644 --- a/examples/xonotic/Makefile +++ b/examples/xonotic/Makefile @@ -60,4 +60,4 @@ echo-image-tag: # build and push the xonotic image with specified tag cloud-build: - gcloud builds submit --config=cloudbuild.yaml + gcloud builds submit --config=../cloudbuild.yaml From e64719bff3430b9fab7c618fa22e3d8d99f276d8 Mon Sep 17 00:00:00 2001 From: Kalaiselvi Murugesan Date: Thu, 27 Jul 2023 18:09:03 +0000 Subject: [PATCH 5/6] cloudbuild.yaml for xonotic image --- examples/allocation-endpoint/Makefile | 22 +++++++--------------- examples/autoscaler-webhook/Makefile | 17 ++++------------- examples/crd-client/Makefile | 18 ++++-------------- examples/supertuxkart/Makefile | 18 ++++-------------- examples/xonotic/Makefile | 2 +- examples/{ => xonotic}/cloudbuild.yaml | 13 +------------ 6 files changed, 21 insertions(+), 69 deletions(-) rename examples/{ => xonotic}/cloudbuild.yaml (85%) diff --git a/examples/allocation-endpoint/Makefile b/examples/allocation-endpoint/Makefile index 5d62eed485..179c7c14bb 100644 --- a/examples/allocation-endpoint/Makefile +++ b/examples/allocation-endpoint/Makefile @@ -22,18 +22,14 @@ # \ V / (_| | | | | (_| | |_) | | __\__ \ # \_/ \__,_|_| |_|\__,_|_.__/|_|\___|___/ # -REPOSITORY ?= -PROD_REPO ?= us-docker.pkg.dev/agones-images/examples + +REPOSITORY = us-docker.pkg.dev/agones-images/examples # Directory that this Makefile is in. mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) project_path := $(dir $(mkfile_path)) +server_tag = $(REPOSITORY)/allocation-endpoint-proxy:0.5 root_path = $(realpath $(project_path)/../..) -ifeq ($(REPOSITORY),) - server_tag := allocation-endpoint-proxy:0.5 -else - server_tag = $(REPOSITORY)/allocation-endpoint-proxy:0.5 -endif # _____ _ # |_ _|_ _ _ __ __ _ ___| |_ ___ @@ -47,20 +43,16 @@ build: cd $(project_path)/server/ && docker build --tag=$(server_tag) . run: - docker run --network=host $(PROD_REPO)/$(server_tag) $(args) + docker run --network=host $(server_tag) $(args) # check if hosted on Google Artifact Registry gar-check: - gcloud container images describe $(PROD_REPO)/$(server_tag) + gcloud container images describe $(server_tag) #output the tag for this image echo-image-tag: - @echo $(PROD_REPO)/$(server_tag) + @echo $(server_tag) # Push the docker image push: build - docker push $(server_tag) - -# build and push the allocation-endpoint image with specified tag -cloud-build: - gcloud builds submit --config=../cloudbuild.yaml \ No newline at end of file + docker push $(server_tag) \ No newline at end of file diff --git a/examples/autoscaler-webhook/Makefile b/examples/autoscaler-webhook/Makefile index 22d3b68d42..ca0bf60277 100644 --- a/examples/autoscaler-webhook/Makefile +++ b/examples/autoscaler-webhook/Makefile @@ -23,17 +23,12 @@ # \_/ \__,_|_| |_|\__,_|_.__/|_|\___|___/ # -REPOSITORY ?= -PROD_REPO ?= us-docker.pkg.dev/agones-images/examples +REPOSITORY = us-docker.pkg.dev/agones-images/examples mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) project_path := $(dir $(mkfile_path)) +autoscaler_webhook_tag = $(REPOSITORY)/autoscaler-webhook:0.7 root_path = $(realpath $(project_path)/../..) -ifeq ($(REPOSITORY),) - autoscaler_webhook_tag := autoscaler-webhook:0.7 -else - autoscaler_webhook_tag = $(REPOSITORY)/autoscaler-webhook:0.7 -endif # _____ _ # |_ _|_ _ _ __ __ _ ___| |_ ___ @@ -52,12 +47,8 @@ push: build # check if hosted on Google Artifact Registry gar-check: - gcloud container images describe $(PROD_REPO)/$(autoscaler_webhook_tag) + gcloud container images describe $(autoscaler_webhook_tag) #output the tag for this image echo-image-tag: - @echo $(PROD_REPO)/$(autoscaler_webhook_tag) - -# build and push the autoscaler-webhook image with specified tag -cloud-build: - gcloud builds submit --config=../cloudbuild.yaml + @echo $(autoscaler_webhook_tag) diff --git a/examples/crd-client/Makefile b/examples/crd-client/Makefile index c80d09e21e..7dc12eb9ee 100644 --- a/examples/crd-client/Makefile +++ b/examples/crd-client/Makefile @@ -23,14 +23,9 @@ # \_/ \__,_|_| |_|\__,_|_.__/|_|\___|___/ # -REPOSITORY ?= -PROD_REPO ?= us-docker.pkg.dev/agones-images/examples +REPOSITORY ?= us-docker.pkg.dev/agones-images/examples -ifeq ($(REPOSITORY),) - server_tag := crd-client:0.10 -else - server_tag = $(REPOSITORY)/crd-client:0.10 -endif +server_tag = $(REPOSITORY)/crd-client:0.10 # _____ _ # |_ _|_ _ _ __ __ _ ___| |_ ___ @@ -48,13 +43,8 @@ push: build # check if hosted on Google Artifact Registry gar-check: - gcloud container images describe $(PROD_REPO)/$(server_tag) + gcloud container images describe $(server_tag) #output the tag for this image echo-image-tag: - @echo $(PROD_REPO)/$(server_tag) - -# build and push the autoscaler-webhook image with specified tag -cloud-build: - gcloud builds submit --config=../cloudbuild.yaml - + @echo $(server_tag) \ No newline at end of file diff --git a/examples/supertuxkart/Makefile b/examples/supertuxkart/Makefile index ddbdc0aa5e..0318d99f77 100644 --- a/examples/supertuxkart/Makefile +++ b/examples/supertuxkart/Makefile @@ -23,17 +23,11 @@ # \_/ \__,_|_| |_|\__,_|_.__/|_|\___|___/ # -REPOSITORY ?= -PROD_REPO ?= us-docker.pkg.dev/agones-images/examples +REPOSITORY = us-docker.pkg.dev/agones-images/examples mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) project_path := $(dir $(mkfile_path)) - -ifeq ($(REPOSITORY),) - image_tag := supertuxkart-example:0.8 -else - image_tag = $(REPOSITORY)/supertuxkart-example:0.8 -endif +image_tag = $(REPOSITORY)/supertuxkart-example:0.8 # _____ _ # |_ _|_ _ _ __ __ _ ___| |_ ___ @@ -56,12 +50,8 @@ test: # check if hosted on Google Artifact Registry gar-check: - gcloud container images describe $(PROD_REPO)/$(image_tag) + gcloud container images describe $(image_tag) #output the tag for this image echo-image-tag: - @echo $(PROD_REPO)/$(image_tag) - -# build and push the autoscaler-webhook image with specified tag -cloud-build: - gcloud builds submit --config=../cloudbuild.yaml + @echo $(image_tag) diff --git a/examples/xonotic/Makefile b/examples/xonotic/Makefile index 8f5b7d64d9..01b8dd426c 100644 --- a/examples/xonotic/Makefile +++ b/examples/xonotic/Makefile @@ -60,4 +60,4 @@ echo-image-tag: # build and push the xonotic image with specified tag cloud-build: - gcloud builds submit --config=../cloudbuild.yaml + gcloud builds submit --config=cloudbuild.yaml diff --git a/examples/cloudbuild.yaml b/examples/xonotic/cloudbuild.yaml similarity index 85% rename from examples/cloudbuild.yaml rename to examples/xonotic/cloudbuild.yaml index 4c5ca151c1..558e5b359d 100644 --- a/examples/cloudbuild.yaml +++ b/examples/xonotic/cloudbuild.yaml @@ -25,20 +25,9 @@ steps: entrypoint: "docker" args: ["build", "-f", "Dockerfile.build", "-t", "make-docker", "."] - # build xonotic image to GCR - - name: "make-docker" - id: build - dir: "." - env: - - REPOSITORY=${_REPOSITORY} - script: | - make -j 1 build - - # push xonotic image to GCR + # build and push xonotic image to GCR - name: "make-docker" id: push - waitFor: - - build dir: "." env: - REPOSITORY=${_REPOSITORY} From 38e53ddda912ea2aab8e08cc00bbc81a94ff580b Mon Sep 17 00:00:00 2001 From: Kalaiselvi Murugesan Date: Wed, 2 Aug 2023 03:06:24 +0000 Subject: [PATCH 6/6] small changes in script --- examples/xonotic/cloudbuild.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/xonotic/cloudbuild.yaml b/examples/xonotic/cloudbuild.yaml index 558e5b359d..66555128ca 100644 --- a/examples/xonotic/cloudbuild.yaml +++ b/examples/xonotic/cloudbuild.yaml @@ -32,10 +32,9 @@ steps: env: - REPOSITORY=${_REPOSITORY} script: | - make -j 1 push + make push options: - machineType: E2_HIGHCPU_32 dynamic_substitutions: true substitutions: