cloud-run-button
cloud-run-button copied to clipboard
Container Registry deprecation
Probably need to make container push to artifact registry
likely code line https://github.com/GoogleCloudPlatform/cloud-run-button/blob/master/cmd/cloudshell_open/main.go#L301
We would also need to create an artifact registry. Source based deployments prompt for the creation of one, which creates Docker registry cloud-run-source-deploy
in us-central1.
Given other uses of the go client library (for service enabling), probably need to do the same method:
https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1#Client.CreateRepository https://pkg.go.dev/cloud.google.com/go/artifactregistry/apiv1/artifactregistrypb#CreateRepositoryRequest
Flow would probably be:
- check expected repo exists
- if it doesn't, create it
- replace image name with new name based on new registry.
Keeping it simple here I believe fits with the existing 'default' registry name and location from other processes, which should mean there's a percentage of no-ops required.
Recently Cloud Run added "Regionalize builds for Cloud Run source deploys", so we should check what that logic is and use it as our repo, if it exists.