Merge "UI: move from Google Container Registry to Google Artifact Registry" into main
diff --git a/infra/ui.perfetto.dev/README.md b/infra/ui.perfetto.dev/README.md
index bf42acd..889402e 100644
--- a/infra/ui.perfetto.dev/README.md
+++ b/infra/ui.perfetto.dev/README.md
@@ -22,7 +22,8 @@
 Cloud Build invokes the equivalent of:
 
 ```bash
-docker run gcr.io/perfetto-ui/perfetto-ui-builder /ui_builder_entrypoint.sh
+docker run europe-docker.pkg.dev/perfetto-ui/builder/perfetto-ui-builder \
+    /ui_builder_entrypoint.sh
 ```
 
 NOTE: the `ui_builder_entrypoint.sh` script is bundled in the docker container.
@@ -30,7 +31,19 @@
 
 To update the container:
 
+Prerequisite:
+Install the Google Cloud SDK from https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz 
+
+
 ```bash
-docker build -t gcr.io/perfetto-ui/perfetto-ui-builder infra/ui.perfetto.dev/builder
-docker push gcr.io/perfetto-ui/perfetto-ui-builder
+# Obtain a temporary token to impersonate the service account as per
+# https://cloud.google.com/artifact-registry/docs/docker/authentication
+# You need to be a member of perfetto-cloud-infra.prod to do this.
+gcloud auth print-access-token \
+    --impersonate-service-account perfetto-ui-dev@perfetto-ui.iam.gserviceaccount.com | docker login \
+    -u oauth2accesstoken \
+    --password-stdin https://europe-docker.pkg.dev
+
+docker build -t europe-docker.pkg.dev/perfetto-ui/builder/perfetto-ui-builder infra/ui.perfetto.dev/builder
+docker push europe-docker.pkg.dev/perfetto-ui/builder/perfetto-ui-builder
 ```
diff --git a/infra/ui.perfetto.dev/cloudbuild.yaml b/infra/ui.perfetto.dev/cloudbuild.yaml
index 901389d..8097d1e 100644
--- a/infra/ui.perfetto.dev/cloudbuild.yaml
+++ b/infra/ui.perfetto.dev/cloudbuild.yaml
@@ -3,7 +3,7 @@
 # FROM: infra/ui.perfetto.dev/cloudbuild.yaml
 # TO: TWO trigger configs inline YAML in Google Cloud Console > Cloud Build.
 steps:
-- name: gcr.io/$PROJECT_ID/perfetto-ui-builder
+- name: europe-docker.pkg.dev/perfetto-ui/builder/perfetto-ui-builder
   args:
   - /ui_builder_entrypoint.sh
   - ''
diff --git a/infra/ui.perfetto.dev/cloudbuild_release.yaml b/infra/ui.perfetto.dev/cloudbuild_release.yaml
index 3c36aaa..1dfe79a 100644
--- a/infra/ui.perfetto.dev/cloudbuild_release.yaml
+++ b/infra/ui.perfetto.dev/cloudbuild_release.yaml
@@ -3,7 +3,7 @@
 # FROM: infra/ui.perfetto.dev/cloudbuild.yaml
 # TO: TWO trigger configs inline YAML in Google Cloud Console > Cloud Build.
 steps:
-- name: gcr.io/$PROJECT_ID/perfetto-ui-builder
+- name: europe-docker.pkg.dev/perfetto-ui/builder/perfetto-ui-builder
   args:
   - /ui_builder_entrypoint.sh
   - $BRANCH_NAME