-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fix(ko): Do not print image name to stdout #6928
fix(ko): Do not print image name to stdout #6928
Conversation
Codecov Report
@@ Coverage Diff @@
## main #6928 +/- ##
==========================================
- Coverage 70.48% 69.14% -1.34%
==========================================
Files 515 547 +32
Lines 23150 25065 +1915
==========================================
+ Hits 16317 17332 +1015
- Misses 5776 6572 +796
- Partials 1057 1161 +104
Continue to review full report at Codecov.
|
With this change, the `ko` builder no longer prints the image name to `stdout` by default. Originally, this was added to the `ko` builder to mimic the behavior of the `ko` CLI. Other Skaffold image builders do not print the image name in this way. The reason this is useful for existing `ko` CLI users is that some documented workflows rely on capturing the image name from `stdout`, see https://github.com/google/ko/blob/v0.9.3/README.md#build-an-image After some investigation, the better option seems to be to rely on the existing `--quiet` and `--output` Skaffold flags to format the output of the image name(s). This change also updates the `ko` builder documentation to show existing `ko` CLI users how to capture the image name by providing an appropriate Go template to `--output`. Fixes: GoogleContainerTools#6835 Closes: GoogleContainerTools#6836 Tracking: GoogleContainerTools#6041
373c210
to
4a34ec7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
With this change, the
ko
builder no longer prints the image name tostdout
by default.Originally, this was added to the
ko
builder to mimic the behavior of theko
CLI. Other Skaffold image builders do not print the image name in this way.The reason this is useful for existing
ko
CLI users is that some documented workflows rely on capturing the image name fromstdout
, see https://github.com/google/ko/blob/v0.9.3/README.md#build-an-image.After some investigation, the better option seems to be to rely on the existing
--quiet
and--output
Skaffold flags to format the output of the image name(s).This change also updates the
ko
builder documentation to show existingko
CLI users how to capture the image name by providing an appropriate Go template to--output
.Fixes: #6835
Closes: #6836
Tracking: #6041