After configuring deployments from your Google Container Registry (GCR), you'll probably also want to enable automatic deployments when you push a new container image. This requires adding a "webhook" to send Uffizzi notifications. This section will walk you through configuring this webhook.
First, create a Topic on Google's Pub/Sub API:
gcloud pubsub topics create gcr
Then configure a Subscription to notify Uffizzi:
gcloud pubsub subscriptions create uffizzi-gcr-webhook --topic=gcr --push-endpoint=https://app.uffizzi.com/api/v1/webhooks/google --expiration-period=never --message-retention-duration=10m
If these commands fail, make sure you have enabled the Pub/Sub API for your Google Cloud Project. You may also need to specify
--project if you have multiple Google Cloud Projects.
You can read more about configuring notifications from GCR here: https://cloud.google.com/container-registry/docs/configuring-notifications
Removing Webhook Configuration
To stop sending notifications to Uffizzi, you can remove the webhook you configured above:
gcloud pubsub subscriptions delete uffizzi-gcr-webhook
If this was your only Subscription to the
gcr Topic, you could also delete that Topic.
If that was your only Topic, you could also disable the Pub/Sub API.