Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fork repo and set up Continuous Deployment instead of one-shot deployment #188

Open
steren opened this issue Jul 14, 2020 · 3 comments
Open

Comments

@steren
Copy link
Collaborator

steren commented Jul 14, 2020

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:

  1. Fork the repo.
  2. set up a Cloud Build Trigger to automatically deploy from the fork to Cloud Run
  3. Run this trigger.

Maybe the button could help do that?

This would address along the way:

@jamesward
Copy link
Contributor

Yeah, that is what I've been thinking about related to #75

@ahmetb
Copy link
Contributor

ahmetb commented Jul 14, 2020

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.

@glasnt
Copy link
Collaborator

glasnt commented Jul 15, 2020

2 cents:

  • Cloud Run Button is great for the optional initial provisioning and first deployment
  • gcloud builds submit --tag/gcloud run deploy is okay for a two-step re-deployment
  • gcloud builds submit with a configured cloudbuild.yaml is 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants