GoogleCloudPlatform / cloud-run-button

Let anyone deploy your GitHub repos to Google Cloud Run with a single click
https://cloud.run
Apache License 2.0
526 stars 91 forks source link

Pack Publish #132

Open jamesward opened 4 years ago

jamesward commented 4 years ago

We should be able to do --publish with the pack build and then not push the image manually.

ahmetb commented 4 years ago

I think the point of that currently is to separate build and push and render as separate steps so that users don’t keep staring at a static screen for a long time.

Also for a beginner, it highlights the fact that the image is built and is pushed to somewhere. That’s my current rationale, also some code reuse around pushing images.

jamesward commented 4 years ago

With Jib right now we don't do the manual push because Jib does it for us. (I had just noticed that in the code.)

For timing, here are the results from my local machine on a Node app:

$ time pack build --publish gcr.io/crb-test/nodebars
real    0m27.635s

$ time pack build gcr.io/crb-test/nodebars
real    0m20.684s

So it does take 7 seconds longer to do it with --publish. Which is a while on the when it doesn't seem like anything is happening. So maybe to do this we'd have to reconsider not displaying the build output. Or we can disable Jib's publish and make it work like the others for consistency.

ahmetb commented 4 years ago

I think it's cleaner to disable Jib's publish and use docker push as well.

There was a time several years ago that pushing images from code wasn't very future-proof and had issues with credential providers etc, but now they probably work fine.

Regardless, I'm ok both ways. My main motive was to show some progress in the CLI by keeping them seperate.