-
Notifications
You must be signed in to change notification settings - Fork 405
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
Set build config via BuildOptions #421
Set build config via BuildOptions #421
Conversation
9bae8e0
to
31f812c
Compare
Enables programmatically overriding build configs when ko is embedded in another tool. Related: ko-build#340, ko-build#419
31f812c
to
bfd6cee
Compare
pkg/commands/resolver_test.go
Outdated
res, err := builder.Build(ctx, "ko://github.com/google/ko/test") | ||
if err != nil { | ||
t.Fatalf("builder.Build(): %v", err) | ||
// TODO This test accesses the network and is slow. Implement a dry-run mode? |
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.
Could revive this issue: #295
I think it's slow from hitting base image stuff?
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.
Yes, it's slow because of the default base image on gcr.io.
#295 looks interesting. For now, I've pushed another commit that uses a local in-memory registry for these unit tests.
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.
For now, I've pushed another commit that uses a local in-memory registry for these unit tests.
Brilliant.
Tests create a local registry (using ggcr) with a dummy base image. This speeds up tests, since they don't need to hit gcr.io to fetch the default distroless base image.
Codecov Report
@@ Coverage Diff @@
## main #421 +/- ##
==========================================
+ Coverage 53.39% 53.50% +0.10%
==========================================
Files 36 36
Lines 1826 1828 +2
==========================================
+ Hits 975 978 +3
+ Misses 700 699 -1
Partials 151 151
Continue to review full report at Codecov.
|
Enables programmatically overriding build configs when ko is embedded in another tool.
Also minor cleanup of the unit test for
NewPublisher()
.Related: #340, #419