From ac8a7513b6f05f97d00999fe6b01d84e74f1f236 Mon Sep 17 00:00:00 2001 From: Max Gong Date: Fri, 16 Dec 2022 00:19:38 +0000 Subject: [PATCH 1/6] Move all actual Agones releases images to GAR --- build/Makefile | 2 +- build/README.md | 8 ++++---- build/includes/google-cloud.mk | 4 ++-- build/terraform/gke/module.tf | 2 +- cloudbuild.yaml | 16 ++++++++-------- cmd/controller/main.go | 2 +- docs/governance/templates/release.md | 8 ++++---- install/helm/agones/values.yaml | 2 +- install/terraform/modules/helm3/variables.tf | 2 +- install/yaml/install.yaml | 8 ++++---- site/content/en/docs/Guides/Client SDKs/local.md | 4 ++-- .../en/docs/Installation/Install Agones/helm.md | 2 +- 12 files changed, 30 insertions(+), 30 deletions(-) diff --git a/build/Makefile b/build/Makefile index ecaaad1840..c66eea3467 100644 --- a/build/Makefile +++ b/build/Makefile @@ -27,7 +27,7 @@ base_version = 1.29.0 # agones image release registry -release_registry = gcr.io/agones-images +release_registry = us-docker.pkg.dev/agones-images/release # # All of the following can be overwritten with environment variables diff --git a/build/README.md b/build/README.md index eb6ec5c253..b51f55b88b 100644 --- a/build/README.md +++ b/build/README.md @@ -226,9 +226,9 @@ installing Agones next. To prepare building and pushing images, let's set the REGISTRY environment variable to point to our new project. You can [choose any registry region](https://cloud.google.com/container-registry/docs/pushing-and-pulling#choosing_a_registry_name) -but for this example, we'll just use `gcr.io`. +but for this example, we'll just use `us-docker.pkg.dev`. -In your shell, run `export REGISTRY=gcr.io/` which will overwrite the default registry settings in our +In your shell, run `export REGISTRY=us-docker.pkg.dev//` which will overwrite the default registry settings in our Make targets. Then, to rebuild our images for this registry, we run `make build-images` again. Before we can push the images, there is one more small step! So that we can run regular `docker push` commands @@ -347,7 +347,7 @@ Prerequisites: To begin, you need to set up the following environment variables: - `KUBECONFIG` should point to the kubeconfig file used to access the cluster; if unset, it defaults to `~/.kube/config` -- `REGISTRY` should point to your image repository of your choice (i.e. gcr.io/) +- `REGISTRY` should point to your image repository of your choice (i.e. us-docker.pkg.dev//) - `IMAGE_PULL_SECRET` must contain the name of the secret required to pull the Agones images, in case you're using a custom repository; if unset, no pull secret will be used - `IMAGE_PULL_SECRET_FILE` must be initialized to the full path of the file containing @@ -417,7 +417,7 @@ command from within `make shell` or locally, to refresh your authentication toke The version of this build. Version defaults to the short hash of the latest commit. ### REGISTRY -The registry that is being used to store docker images. Defaults to gcr.io/agones-images - the release + CI registry. +The registry that is being used to store docker images. Defaults to us-docker.pkg.dev/agones-images/release ### KUBECONFIG The Kubernetes config file used to access the cluster. Defaults to `~/.kube/config` - the file used by default by kubectl. diff --git a/build/includes/google-cloud.mk b/build/includes/google-cloud.mk index 53a078b069..6ed5b9b7e9 100644 --- a/build/includes/google-cloud.mk +++ b/build/includes/google-cloud.mk @@ -83,9 +83,9 @@ gcloud-auth-cluster: $(ensure-build-image) docker run --rm $(common_mounts) $(build_tag) gcloud container clusters get-credentials $(GCP_CLUSTER_NAME) --zone $(GCP_CLUSTER_LOCATION) # authenticate our docker configuration so that you can do a docker push directly -# to the gcr.io repository +# to the Google Artifact Registry repository gcloud-auth-docker: $(ensure-build-image) - docker run --rm $(common_mounts) $(build_tag) gcloud auth print-access-token | docker login -u oauth2accesstoken --password-stdin https://gcr.io + docker run --rm $(common_mounts) $(build_tag) gcloud auth print-access-token | docker login -u oauth2accesstoken --password-stdin https://us-docker.pkg.dev # Clean the gcloud configuration clean-gcloud-config: diff --git a/build/terraform/gke/module.tf b/build/terraform/gke/module.tf index 6704a6b364..f8a1811ef1 100644 --- a/build/terraform/gke/module.tf +++ b/build/terraform/gke/module.tf @@ -78,7 +78,7 @@ variable "pull_policy" { } variable "image_registry" { - default = "gcr.io/agones-images" + default = "us-docker.pkg.dev/agones-images/release" } variable "always_pull_sidecar" { diff --git a/cloudbuild.yaml b/cloudbuild.yaml index b695561a75..b0cd509fc1 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -30,28 +30,28 @@ steps: # Restore any caches # -- name: gcr.io/$PROJECT_ID/restore_cache +- name: us-docker.pkg.dev/$PROJECT_ID/ci/restore_cache id: htmltest-restore-cache args: - '--bucket=gs://$_CACHE_BUCKET' - '--key=$_HTMLTEST_CACHE_KEY' waitFor: ['-'] -- name: gcr.io/$PROJECT_ID/restore_cache +- name: us-docker.pkg.dev/$PROJECT_ID/ci/restore_cache id: cpp-sdk-build-restore-cache args: - '--bucket=gs://$_CACHE_BUCKET' - '--key=$_CPP_SDK_BUILD_CACHE_KEY-$( checksum sdks/cpp/cmake/prerequisites.cmake )' waitFor: ['-'] -- name: gcr.io/$PROJECT_ID/restore_cache +- name: us-docker.pkg.dev/$PROJECT_ID/ci/restore_cache id: cpp-sdk-conformance-restore-cache args: - '--bucket=gs://$_CACHE_BUCKET' - '--key=$_CPP_SDK_CONFORMANCE_CACHE_KEY-$( checksum sdks/cpp/cmake/prerequisites.cmake )' waitFor: ['-'] -- name: gcr.io/$PROJECT_ID/restore_cache +- name: us-docker.pkg.dev/$PROJECT_ID/ci/restore_cache id: rust-sdk-build-restore-cache args: - '--bucket=gs://$_CACHE_BUCKET' @@ -181,7 +181,7 @@ steps: # Cache the cpp sdk build directory, to speed up subsequent builds (considerably) # -- name: 'gcr.io/$PROJECT_ID/save_cache' +- name: 'us-docker.pkg.dev/$PROJECT_ID/ci/save_cache' args: - '--bucket=gs://$_CACHE_BUCKET' - '--key=$_CPP_SDK_BUILD_CACHE_KEY-$( checksum sdks/cpp/cmake/prerequisites.cmake )' @@ -207,7 +207,7 @@ steps: # # Cache the htmltest url checks. Faster builds, and lower network flakiness. # -- name: 'gcr.io/$PROJECT_ID/save_cache' +- name: 'us-docker.pkg.dev/$PROJECT_ID/ci/save_cache' args: - '--bucket=gs://$_CACHE_BUCKET' - '--key=$_HTMLTEST_CACHE_KEY' @@ -283,7 +283,7 @@ steps: # Cache the CPP conformance build directory, to speed up subsequent builds (considerably) # -- name: 'gcr.io/$PROJECT_ID/save_cache' +- name: 'us-docker.pkg.dev/$PROJECT_ID/ci/save_cache' args: - '--bucket=gs://$_CACHE_BUCKET' - '--key=$_CPP_SDK_CONFORMANCE_CACHE_KEY-$( checksum sdks/cpp/cmake/prerequisites.cmake )' @@ -296,7 +296,7 @@ steps: # Cache the Rust SDK build directory, to speed up subsequent builds (considerably) # -- name: 'gcr.io/$PROJECT_ID/save_cache' +- name: 'us-docker.pkg.dev/$PROJECT_ID/ci/save_cache' args: - '--bucket=gs://$_CACHE_BUCKET' - '--key=$_RUST_SDK_BUILD_CACHE_KEY-$( checksum test/sdk/rust/Cargo.toml )' diff --git a/cmd/controller/main.go b/cmd/controller/main.go index 7a54cdd2d4..a2b4bae098 100644 --- a/cmd/controller/main.go +++ b/cmd/controller/main.go @@ -249,7 +249,7 @@ func parseEnvFlags() config { } base := filepath.Dir(exec) - viper.SetDefault(sidecarImageFlag, "gcr.io/agones-images/agones-sdk:"+pkg.Version) + viper.SetDefault(sidecarImageFlag, "us-docker.pkg.dev/agones-images/release/agones-sdk:"+pkg.Version) viper.SetDefault(sidecarCPURequestFlag, "0") viper.SetDefault(sidecarCPULimitFlag, "0") viper.SetDefault(sidecarMemoryRequestFlag, "0") diff --git a/docs/governance/templates/release.md b/docs/governance/templates/release.md index cbb0446531..1b9c3732fb 100644 --- a/docs/governance/templates/release.md +++ b/docs/governance/templates/release.md @@ -18,10 +18,10 @@ See }} --local +docker run --network=host --rm us-docker.pkg.dev/agones-images/release/agones-sdk:{{< release-version >}} --local ``` You should see a similar output to what you would if you were running the binary directly, i.e. outside a container. @@ -147,5 +147,5 @@ this is also possible: wget https://raw.githubusercontent.com/googleforgames/agones/{{< release-branch >}}/examples/simple-game-server/gameserver.yaml # required so that the `agones` user in the container can read the file chmod o+r gameserver.yaml -docker run --network=host --rm -v $(pwd)/gameserver.yaml:/tmp/gameserver.yaml gcr.io/agones-images/agones-sdk:{{}} --local -f /tmp/gameserver.yaml +docker run --network=host --rm -v $(pwd)/gameserver.yaml:/tmp/gameserver.yaml us-docker.pkg.dev/agones-images/release/agones-sdk:{{}} --local -f /tmp/gameserver.yaml ``` diff --git a/site/content/en/docs/Installation/Install Agones/helm.md b/site/content/en/docs/Installation/Install Agones/helm.md index 8268e1ddd0..1bc2e8d9da 100644 --- a/site/content/en/docs/Installation/Install Agones/helm.md +++ b/site/content/en/docs/Installation/Install Agones/helm.md @@ -98,7 +98,7 @@ The following tables lists the configurable parameters of the Agones chart and t | `agones.serviceaccount.controller` | Service account name for the controller. **Note**: Will be replaced with `agones.serviceaccount.controller.name` in Agones 1.16 | `agones-controller` | | `agones.serviceaccount.sdk` | Service account name for the sdk. **Note**: Will be replaced with `agones.serviceaccount.sdk.name` in Agones 1.16 | `agones-sdk` | | `agones.serviceaccount.sdk.annotations` | A map of namespaces to maps of [Annotations][annotations] added to the Agones SDK service account for the specified namespaces | `{}` | -| `agones.image.registry` | Global image registry for all images | `gcr.io/agones-images` | +| `agones.image.registry` | Global image registry for all the Agones systrem images | `us-docker.pkg.dev/agones-images/release` | | `agones.image.tag` | Global image tag for all images | `{{< release-version >}}` | | `agones.image.controller.name` | Image name for the controller | `agones-controller` | | `agones.image.controller.pullPolicy` | Image pull policy for the controller | `IfNotPresent` | From 90d744b27f15e00a2ed9228a2c8318320121a103 Mon Sep 17 00:00:00 2001 From: Max Gong Date: Fri, 16 Dec 2022 22:01:45 +0000 Subject: [PATCH 2/6] fix comments --- build/Makefile | 7 +++---- build/README.md | 7 +++++-- build/includes/release.mk | 3 +++ site/content/en/docs/Guides/Client SDKs/local.md | 5 +++++ site/content/en/docs/Installation/Install Agones/helm.md | 5 +++++ 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/build/Makefile b/build/Makefile index 724a5a35d1..5730715c6b 100644 --- a/build/Makefile +++ b/build/Makefile @@ -26,9 +26,8 @@ # base version target. This is usually the next release. base_version = 1.29.0 -# agones image release registry -release_registry = us-docker.pkg.dev/agones-images/release - +# agones image registry for development +dev_registry = us-docker.pkg.dev/agones-images/dev # # All of the following can be overwritten with environment variables # or passed through directly when invoking the relevent Make targets @@ -37,7 +36,7 @@ release_registry = us-docker.pkg.dev/agones-images/release # Version defaults to the short hash of the latest commit VERSION ?= $(base_version)-$(shell git rev-parse --short=7 HEAD) # The registry that is being used to store docker images -REGISTRY ?= $(release_registry) +REGISTRY ?= $(dev_registry) # kubectl configuration to use KUBECONFIG ?= ~/.kube/config # The (gcloud) test cluster that is being worked against diff --git a/build/README.md b/build/README.md index b51f55b88b..78d3dfbfb3 100644 --- a/build/README.md +++ b/build/README.md @@ -225,8 +225,11 @@ Assuming that all works, let's exit the shell by typing `exit` and hitting enter installing Agones next. To prepare building and pushing images, let's set the REGISTRY environment variable to point to our new project. -You can [choose any registry region](https://cloud.google.com/container-registry/docs/pushing-and-pulling#choosing_a_registry_name) +You can choose either Google Container Registry or Google Artifact Registry. But for this guidance, we will use Google Artifact Registry. +You can [choose any registry region](https://cloud.google.com/artifact-registry/docs/docker/pushing-and-pulling) but for this example, we'll just use `us-docker.pkg.dev`. +Please follow the [instructions](https://cloud.google.com/artifact-registry/docs/docker/pushing-and-pulling#before_you_begin) to create the registry +in your project properly before you contine. In your shell, run `export REGISTRY=us-docker.pkg.dev//` which will overwrite the default registry settings in our Make targets. Then, to rebuild our images for this registry, we run `make build-images` again. @@ -725,7 +728,7 @@ Change AGONES_VERSION to a specific version you want to install. #### `make gcloud-terraform-install` Create GKE cluster and install current version of agones. -The current version should be built and pushed to release_registry beforehand: +The current version should be built and pushed to `$(REGISTRY)` beforehand: ``` make build-images make push diff --git a/build/includes/release.mk b/build/includes/release.mk index 5a5e59664f..2c322cdb56 100644 --- a/build/includes/release.mk +++ b/build/includes/release.mk @@ -23,6 +23,9 @@ # targets for an Agones release # +# agones image release registry +release_registry = us-docker.pkg.dev/agones-images/release + # generate a changelog using github-changelog-generator gen-changelog: RELEASE_VERSION ?= $(base_version) gen-changelog: RELEASE_BRANCH ?= main diff --git a/site/content/en/docs/Guides/Client SDKs/local.md b/site/content/en/docs/Guides/Client SDKs/local.md index dafe0769ab..8115fc0072 100644 --- a/site/content/en/docs/Guides/Client SDKs/local.md +++ b/site/content/en/docs/Guides/Client SDKs/local.md @@ -129,7 +129,12 @@ is to have them both run using the host network, like so: In one shell run: ```shell +{{% feature publishVersion="1.29.0" %}} docker run --network=host --rm us-docker.pkg.dev/agones-images/release/agones-sdk:{{< release-version >}} --local +{{% /feature %}} +{{% feature expiryVersion="1.29.0" %}} +docker run --network=host --rm gcr.io/agones-images/agones-sdk:{{< release-version >}} --local +{{% /feature %}} ``` You should see a similar output to what you would if you were running the binary directly, i.e. outside a container. diff --git a/site/content/en/docs/Installation/Install Agones/helm.md b/site/content/en/docs/Installation/Install Agones/helm.md index 1bc2e8d9da..b12aa25f09 100644 --- a/site/content/en/docs/Installation/Install Agones/helm.md +++ b/site/content/en/docs/Installation/Install Agones/helm.md @@ -98,7 +98,12 @@ The following tables lists the configurable parameters of the Agones chart and t | `agones.serviceaccount.controller` | Service account name for the controller. **Note**: Will be replaced with `agones.serviceaccount.controller.name` in Agones 1.16 | `agones-controller` | | `agones.serviceaccount.sdk` | Service account name for the sdk. **Note**: Will be replaced with `agones.serviceaccount.sdk.name` in Agones 1.16 | `agones-sdk` | | `agones.serviceaccount.sdk.annotations` | A map of namespaces to maps of [Annotations][annotations] added to the Agones SDK service account for the specified namespaces | `{}` | +{{% feature publishVersion="1.29.0" %}} | `agones.image.registry` | Global image registry for all the Agones systrem images | `us-docker.pkg.dev/agones-images/release` | +{{% /feature %}} +{{% feature expiryVersion="1.29.0" %}} +| `agones.image.registry` | Global image registry for all images | `gcr.io/agones-images` | +{{% /feature %}} | `agones.image.tag` | Global image tag for all images | `{{< release-version >}}` | | `agones.image.controller.name` | Image name for the controller | `agones-controller` | | `agones.image.controller.pullPolicy` | Image pull policy for the controller | `IfNotPresent` | From deee4644ba0a2b62e984358cc421ec53dd10e954 Mon Sep 17 00:00:00 2001 From: Max Gong Date: Sat, 17 Dec 2022 00:27:14 +0000 Subject: [PATCH 3/6] remove default Registry --- build/Makefile | 5 +---- build/README.md | 5 +++-- cloudbuild.yaml | 8 ++++++++ site/cloudbuild.yaml | 2 ++ site/content/en/docs/Guides/Client SDKs/local.md | 6 ++++-- site/content/en/docs/Installation/Install Agones/helm.md | 8 ++------ 6 files changed, 20 insertions(+), 14 deletions(-) diff --git a/build/Makefile b/build/Makefile index 5730715c6b..7a737cc70f 100644 --- a/build/Makefile +++ b/build/Makefile @@ -26,8 +26,6 @@ # base version target. This is usually the next release. base_version = 1.29.0 -# agones image registry for development -dev_registry = us-docker.pkg.dev/agones-images/dev # # All of the following can be overwritten with environment variables # or passed through directly when invoking the relevent Make targets @@ -35,8 +33,7 @@ dev_registry = us-docker.pkg.dev/agones-images/dev # Version defaults to the short hash of the latest commit VERSION ?= $(base_version)-$(shell git rev-parse --short=7 HEAD) -# The registry that is being used to store docker images -REGISTRY ?= $(dev_registry) + # kubectl configuration to use KUBECONFIG ?= ~/.kube/config # The (gcloud) test cluster that is being worked against diff --git a/build/README.md b/build/README.md index 78d3dfbfb3..e7f3d44b81 100644 --- a/build/README.md +++ b/build/README.md @@ -225,7 +225,8 @@ Assuming that all works, let's exit the shell by typing `exit` and hitting enter installing Agones next. To prepare building and pushing images, let's set the REGISTRY environment variable to point to our new project. -You can choose either Google Container Registry or Google Artifact Registry. But for this guidance, we will use Google Artifact Registry. +You can choose either Google Container Registry or Google Artifact Registry but you must set it explicitly. +For this guidance, we will use Google Artifact Registry. You can [choose any registry region](https://cloud.google.com/artifact-registry/docs/docker/pushing-and-pulling) but for this example, we'll just use `us-docker.pkg.dev`. Please follow the [instructions](https://cloud.google.com/artifact-registry/docs/docker/pushing-and-pulling#before_you_begin) to create the registry @@ -420,7 +421,7 @@ command from within `make shell` or locally, to refresh your authentication toke The version of this build. Version defaults to the short hash of the latest commit. ### REGISTRY -The registry that is being used to store docker images. Defaults to us-docker.pkg.dev/agones-images/release +The registry that is being used to store docker images. It doesn't have default value and has to be set explicitly. ### KUBECONFIG The Kubernetes config file used to access the cluster. Defaults to `~/.kube/config` - the file used by default by kubectl. diff --git a/cloudbuild.yaml b/cloudbuild.yaml index 83e7c767da..cfb1d7c022 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -75,6 +75,8 @@ steps: - name: "make-docker" id: pull-build-image dir: "build" + env: + - "REGISTRY=${_REGISTRY}" args: ["pull-build-image"] waitFor: - build-make-docker @@ -86,6 +88,8 @@ steps: - name: "make-docker" id: pull-build-sdk-base-image dir: "build" + env: + - "REGISTRY=${_REGISTRY}" args: ["pull-build-sdk-base-image"] waitFor: - build-make-docker @@ -131,6 +135,8 @@ steps: waitFor: - lint dir: "build" + env: + - "REGISTRY=${_REGISTRY}" args: ["push-build-image"] # push the build image (which won't do anything if it's already there) # @@ -141,6 +147,8 @@ steps: waitFor: - ensure-build-sdk-image-base dir: "build" + env: + - "REGISTRY=${_REGISTRY}" args: ["push-build-sdk-base-image"] # diff --git a/site/cloudbuild.yaml b/site/cloudbuild.yaml index ed53772c09..4da82fae3c 100644 --- a/site/cloudbuild.yaml +++ b/site/cloudbuild.yaml @@ -29,6 +29,8 @@ steps: args: ['build', '-f', 'Dockerfile.build', '-t', 'make-docker', '.'] # we need docker and make to run everything. - name: "make-docker" dir: "build" + env: + - "REGISTRY=${_REGISTRY}" args: ["pull-build-image"] # since we are past CI build, we can assume that the build image exists. # diff --git a/site/content/en/docs/Guides/Client SDKs/local.md b/site/content/en/docs/Guides/Client SDKs/local.md index 8115fc0072..8ceec13113 100644 --- a/site/content/en/docs/Guides/Client SDKs/local.md +++ b/site/content/en/docs/Guides/Client SDKs/local.md @@ -128,14 +128,16 @@ is to have them both run using the host network, like so: In one shell run: -```shell {{% feature publishVersion="1.29.0" %}} +```shell docker run --network=host --rm us-docker.pkg.dev/agones-images/release/agones-sdk:{{< release-version >}} --local +``` {{% /feature %}} {{% feature expiryVersion="1.29.0" %}} +```shell docker run --network=host --rm gcr.io/agones-images/agones-sdk:{{< release-version >}} --local -{{% /feature %}} ``` +{{% /feature %}} You should see a similar output to what you would if you were running the binary directly, i.e. outside a container. diff --git a/site/content/en/docs/Installation/Install Agones/helm.md b/site/content/en/docs/Installation/Install Agones/helm.md index b12aa25f09..4e65b0d9c0 100644 --- a/site/content/en/docs/Installation/Install Agones/helm.md +++ b/site/content/en/docs/Installation/Install Agones/helm.md @@ -98,12 +98,7 @@ The following tables lists the configurable parameters of the Agones chart and t | `agones.serviceaccount.controller` | Service account name for the controller. **Note**: Will be replaced with `agones.serviceaccount.controller.name` in Agones 1.16 | `agones-controller` | | `agones.serviceaccount.sdk` | Service account name for the sdk. **Note**: Will be replaced with `agones.serviceaccount.sdk.name` in Agones 1.16 | `agones-sdk` | | `agones.serviceaccount.sdk.annotations` | A map of namespaces to maps of [Annotations][annotations] added to the Agones SDK service account for the specified namespaces | `{}` | -{{% feature publishVersion="1.29.0" %}} -| `agones.image.registry` | Global image registry for all the Agones systrem images | `us-docker.pkg.dev/agones-images/release` | -{{% /feature %}} -{{% feature expiryVersion="1.29.0" %}} -| `agones.image.registry` | Global image registry for all images | `gcr.io/agones-images` | -{{% /feature %}} +| `agones.image.registry` | Global image registry for all images | `gcr.io/agones-images` | | `agones.image.tag` | Global image tag for all images | `{{< release-version >}}` | | `agones.image.controller.name` | Image name for the controller | `agones-controller` | | `agones.image.controller.pullPolicy` | Image pull policy for the controller | `IfNotPresent` | @@ -231,6 +226,7 @@ The following tables lists the configurable parameters of the Agones chart and t | Parameter | Description | Default | |---------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------| +| `agones.image.registry` | Global image registry for all the Agones systrem images | `us-docker.pkg.dev/agones-images/release` {{% /feature %}} [toleration]: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ From 5f0d4c7e5d3b3db50c86c94b33fd2ce250685d6b Mon Sep 17 00:00:00 2001 From: Max Gong Date: Sat, 17 Dec 2022 01:08:49 +0000 Subject: [PATCH 4/6] add missing env --- cloudbuild.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cloudbuild.yaml b/cloudbuild.yaml index cfb1d7c022..986a660bbc 100644 --- a/cloudbuild.yaml +++ b/cloudbuild.yaml @@ -282,6 +282,8 @@ steps: - name: "make-docker" id: sdk-conformance dir: "build" + env: + - "REGISTRY=${_REGISTRY}" args: [ "-j", "5", "--output-sync=target", "run-sdk-conformance-tests"] waitFor: - build-images From 2a4dc9c0797176816477813e0eec8f078af68e45 Mon Sep 17 00:00:00 2001 From: Max Gong Date: Tue, 20 Dec 2022 22:54:59 +0000 Subject: [PATCH 5/6] fix typos --- build/README.md | 2 +- site/content/en/docs/Guides/Client SDKs/local.md | 10 ++++++++++ .../en/docs/Installation/Install Agones/helm.md | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/build/README.md b/build/README.md index e7f3d44b81..18994bbab9 100644 --- a/build/README.md +++ b/build/README.md @@ -232,7 +232,7 @@ but for this example, we'll just use `us-docker.pkg.dev`. Please follow the [instructions](https://cloud.google.com/artifact-registry/docs/docker/pushing-and-pulling#before_you_begin) to create the registry in your project properly before you contine. -In your shell, run `export REGISTRY=us-docker.pkg.dev//` which will overwrite the default registry settings in our +In your shell, run `export REGISTRY=us-docker.pkg.dev//` which will set the required `REGISTRY` parameters in our Make targets. Then, to rebuild our images for this registry, we run `make build-images` again. Before we can push the images, there is one more small step! So that we can run regular `docker push` commands diff --git a/site/content/en/docs/Guides/Client SDKs/local.md b/site/content/en/docs/Guides/Client SDKs/local.md index 8ceec13113..10f93371a3 100644 --- a/site/content/en/docs/Guides/Client SDKs/local.md +++ b/site/content/en/docs/Guides/Client SDKs/local.md @@ -150,9 +150,19 @@ docker run --network=host --rm If you want to [mount a custom `gameserver.yaml`](#providing-your-own-gameserver-configuration-for-local-development), this is also possible: +{{% feature publishVersion="1.29.0" %}} ```bash wget https://raw.githubusercontent.com/googleforgames/agones/{{< release-branch >}}/examples/simple-game-server/gameserver.yaml # required so that the `agones` user in the container can read the file chmod o+r gameserver.yaml docker run --network=host --rm -v $(pwd)/gameserver.yaml:/tmp/gameserver.yaml us-docker.pkg.dev/agones-images/release/agones-sdk:{{}} --local -f /tmp/gameserver.yaml ``` +{{% /feature %}} +{{% feature expiryVersion="1.29.0" %}} +```bash +wget https://raw.githubusercontent.com/googleforgames/agones/{{< release-branch >}}/examples/simple-game-server/gameserver.yaml +# required so that the `agones` user in the container can read the file +chmod o+r gameserver.yaml +docker run --network=host --rm -v $(pwd)/gameserver.yaml:/tmp/gameserver.yaml gcr.io/agones-images/agones-sdk:{{}} --local -f /tmp/gameserver.yaml +``` +{{% /feature %}} diff --git a/site/content/en/docs/Installation/Install Agones/helm.md b/site/content/en/docs/Installation/Install Agones/helm.md index 4e65b0d9c0..599bbb980e 100644 --- a/site/content/en/docs/Installation/Install Agones/helm.md +++ b/site/content/en/docs/Installation/Install Agones/helm.md @@ -226,7 +226,7 @@ The following tables lists the configurable parameters of the Agones chart and t | Parameter | Description | Default | |---------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------| -| `agones.image.registry` | Global image registry for all the Agones systrem images | `us-docker.pkg.dev/agones-images/release` +| `agones.image.registry` | Global image registry for all the Agones system images | `us-docker.pkg.dev/agones-images/release` {{% /feature %}} [toleration]: https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/ From 57677798401bb88cd9b9aef467385f56fae8432d Mon Sep 17 00:00:00 2001 From: Max Gong Date: Wed, 21 Dec 2022 22:49:52 +0000 Subject: [PATCH 6/6] add missing substitution --- site/cloudbuild.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/site/cloudbuild.yaml b/site/cloudbuild.yaml index 4da82fae3c..b375a180ae 100644 --- a/site/cloudbuild.yaml +++ b/site/cloudbuild.yaml @@ -62,4 +62,6 @@ steps: - GOPATH=/workspace/go - GO111MODULE=on +substitutions: + _REGISTRY: us-docker.pkg.dev/${PROJECT_ID}/ci tags: ["site"] \ No newline at end of file