cloud-run-button
cloud-run-button copied to clipboard
Fork repo and set up Continuous Deployment instead of one-shot deployment
The experience of the button is amazing: click, get something running.
But that's how you should deploy software. That's great for demos or for one-shot images that don't have to be updated, but not great for iterating on a codebase. Consequently, this limits the use cases for the button (we should not use the button for "boilerplate"-type repositories)
A more sustainable way for customers to go from GitHub to Cloud Run would be:
- Fork the repo.
- set up a Cloud Build Trigger to automatically deploy from the fork to Cloud Run
- Run this trigger.
Maybe the button could help do that?
This would address along the way:
- https://github.com/GoogleCloudPlatform/cloud-run-button/issues/155
- https://github.com/GoogleCloudPlatform/cloud-run-button/issues/103
Yeah, that is what I've been thinking about related to #75
I'll play the devils advocate yet again.
-
Setting up GCB is harder than you think if not impossible. Right now you can't just set up GitHub
<=>GCB integration via the API. I filed a feature request for it several years ago, but there's no plan to do it. -
We have been keeping "redeploy" use case nearly always in mind. I have repos myself (e.g. https://github.com/ahmetb/serverless-url-redirect or https://github.com/ahmetb/sheets-url-shortener) that people can fork+redeploy using the button multiple times.
So it still works without setting up a trigger. Just requires a user interaction. We also show the user how to also re-deploy with the CLI command.
If you think it's possible, go for it.
As I mentioned above and in this comment, interacting with GCB is not easy today.
2 cents:
- Cloud Run Button is great for the optional initial provisioning and first deployment
gcloud builds submit --tag/gcloud run deployis okay for a two-step re-deploymentgcloud builds submitwith a configuredcloudbuild.yamlis great for re-deployment- Firing that GCB call through a trigger is good for continuous deployment
It'd be neat if the button could show a cloudbuild.yaml re-deployment equiv example. If that's just a basic generic file, or if it's generated from the app.json, either way.
The authentication required to link GH and GCB limits the flow of the automation of the full CD process.