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

Deploy Redirector (deploy.cloud.run) #16

Closed
jamesward opened this issue May 29, 2019 · 6 comments
Closed

Deploy Redirector (deploy.cloud.run) #16

jamesward opened this issue May 29, 2019 · 6 comments
Labels
enhancement New feature or request

Comments

@jamesward
Copy link
Contributor

I think we should create a service (on Cloud Run) which gives us a short and custom URL we can link to for the button so that we can:

  • be isolated from underlying URL which we redirect to
  • possibly support the referrer so the git URL is optional
  • track deploy metrics (Collect usage metrics #13)
  • set current or future defaults

So the button href cloud be just something like:
https://cloud.run/deploy

Maybe @steren can chime in on possibly using the existing cloud.run domain.

@steren
Copy link
Collaborator

steren commented May 29, 2019

That's a great idea, and what I originally had in mind for cloud.run

Google owns cloud.run, so that's definitely possible, however, there are processes and delays associated with changing its DNS. And I am also not sure how it can be associated with a Cloud Run service. We'll investigate.

Let's start by creating the service that does the redirect, once we have something up, I can take care of the domain.

@ahmetb
Copy link
Contributor

ahmetb commented May 29, 2019

SGTM. We can make part of this repo and its build process, and deploy to the same Cloud Run - PROD project.

If anyone wants to code up something simple in Go at ./cmd/redirect, I'll leave it up for grabs.

@ahmetb ahmetb added the enhancement New feature or request label May 29, 2019
@steren
Copy link
Collaborator

steren commented May 29, 2019

a suggestion was to use deploy.cloud.run, as it might be easier to configure.

@ahmetb ahmetb added enhancement New feature or request and removed enhancement New feature or request labels May 29, 2019
@ahmetb
Copy link
Contributor

ahmetb commented May 31, 2019

Can someone sketch out an example for this? I'm having trouble imagining how would this look like. Our current URLs aren't that bad and they're likely to outlive the button (since they're part of Open in Cloud Shell API documented here https://cloud.google.com/shell/docs/open-in-cloud-shell).

Unless we do something like Referer check + auto-detect the git repo, I'm not entirely sure if console.cloud.google.com/cloudshell/editor?shellonly=true&...deploy.cloud.run?... is a worthy improvement.

@steren
Copy link
Collaborator

steren commented May 31, 2019

I think using a custom domain would:

  1. minor: be nicer in markdown (cosmetic)
  2. major: shield the buttom from its implementation. Indeed, we could imagine that in the future, this is flow would be directly supported by the a page in the Cloud Console.

@ahmetb ahmetb changed the title Deploy Redirector Deploy Redirector (deploy.cloud.run) Jun 2, 2019
@ahmetb
Copy link
Contributor

ahmetb commented Jun 2, 2019

I've confirmed that when a button is clicked from GitHub, it preserves the Referer header which can help us find the git repo (and perhaps the subdirectory) so that people can even add the Markdown to their repo without even changing any parameters.

jamesward added a commit that referenced this issue Oct 3, 2019
@ahmetb ahmetb closed this as completed in 2890006 Oct 4, 2019
jamesward pushed a commit that referenced this issue Dec 2, 2019
* Add support for Jib Maven builds

* Support mvnw wrapper

* Add quick check

* No *Cmd deref / wrap with detailed error message

* Simplify code

* Fix error message

* James jib maven support (#1)

* add shellonly param - fixes #96 (#97)

* add shellonly param - fixes #96

* info on param not documented

* document deploy.cloud.run - fixes #16 (#98)

* Increase caching and reduce layers in Dockerfile (#90)

* Increase caching and reduce layers in Dockerfile

* Do not download and copy pack

* add GOOGLE_APPLICATION_CREDENTIALS env var (#99)

* add GOOGLE_APPLICATION_CREDENTIALS env var

* multiline

* Redirects for /button.{svg,png} (#102)

This will do a 301 redirect to the static asset on GCS.

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>

* add error handling (#82)

* add error handling

* gofmt

* return only when error took place

* README: add buildpack example (#106)

* README: add buildpack example

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>

* point to new buildpack-samples repo

* add page param - fixes #114 (#115)

* do not fail on unknown cli flags (#117)

This will print a warning about unrecognized cli flags, but will still
continue.

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>

* beta->GA, fix domain cmd (#120)

Moving cloudrun cmds to use GA CLI set.

Also fixing status.

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>

* remove support for git over ssh - fixes #111 (#121)

* Add support for Jib Maven builds

* Support mvnw wrapper

* Add quick check

* No *Cmd deref / wrap with detailed error message

* Simplify code

* Fix error message

* instruction cleanup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants