-
Notifications
You must be signed in to change notification settings - Fork 404
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
Add flag and PublishOption for destination repo #351
Conversation
This enables programmatically setting the destination image repository when embedding ko's `publish` functionality in other tools. See ko-build#348
This commit removes the `DockerRepo` config option and `--docker-repo` flag from the PR. New PR with the extracted config option: ko-build#351
Codecov Report
@@ Coverage Diff @@
## main #351 +/- ##
==========================================
+ Coverage 38.24% 38.27% +0.03%
==========================================
Files 33 33
Lines 1527 1523 -4
==========================================
- Hits 584 583 -1
+ Misses 849 846 -3
Partials 94 94
Continue to review full report at Codecov.
|
Thanks for making this change. I think I'm convinced that grabbing the env var doesn't belong in I'm still a bit less convinced that it therefore needs to be a separate flag. Can we compromise and make Then, to embed this in skaffold (or elsewhere) we can make wdyt? |
Thanks for the quick reply! Yes, that SGTM, I'll go ahead and make the change. The flag isn't required for embedding, I just added it for consistency, since all the other fields in |
This enables programmatically setting the destination image repository and avoids exposing a flag.
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.
Lookin' good, just a few small things.
README.md
Outdated
@@ -68,6 +68,9 @@ e.g.: | |||
- `KO_DOCKER_REPO=gcr.io/my-project`, or | |||
- `KO_DOCKER_REPO=my-dockerhub-user` | |||
|
|||
If both the flag and the environment variable are set, the flag value takes |
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.
This change can be removed now.
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.
Done
- Export functions and a variable to enable embedding of ko's `publish` functionality to be embedded in other tools. See GoogleContainerTools/skaffold#5611 - Remove DockerRepo PublishOption and flag. This removes the `DockerRepo` config option and `--docker-repo` flag from the PR. New PR with the extracted config option: ko-build#351 - Fix copyright headers for boilerplate check. - Use DockerRepo PublishOption instead of env var. - Override defaultBaseImage using BuildOptions. Remove exported package global SetDefaultBaseImage and instead allow programmatic override of the default base image using the field `BaseImage` in `options.BuildOptions`. Also fix copyright header years. - Add BuildOptions parameter to getBaseImage This enables access to BaseImage for programmatically overriding the default base image from `.ko.yaml`. - Add UserAgent to BuildOptions and PublishOptions This enables programmatically overriding the `User-Agent` HTTP request header for both pulling the base image and pushing the built image. - Rename MakeBuilder to NewBuilder and MakePublisher to NewPublisher. For more idiomatic constructor function names.
- Export functions and a variable to enable embedding of ko's `publish` functionality to be embedded in other tools. See GoogleContainerTools/skaffold#5611 - Remove DockerRepo PublishOption and flag. This removes the `DockerRepo` config option and `--docker-repo` flag from the PR. New PR with the extracted config option: ko-build#351 - Fix copyright headers for boilerplate check. - Use DockerRepo PublishOption instead of env var. - Override defaultBaseImage using BuildOptions. Remove exported package global SetDefaultBaseImage and instead allow programmatic override of the default base image using the field `BaseImage` in `options.BuildOptions`. Also fix copyright header years. - Add BuildOptions parameter to getBaseImage This enables access to BaseImage for programmatically overriding the default base image from `.ko.yaml`. - Add UserAgent to BuildOptions and PublishOptions This enables programmatically overriding the `User-Agent` HTTP request header for both pulling the base image and pushing the built image. - Rename MakeBuilder to NewBuilder and MakePublisher to NewPublisher. For more idiomatic constructor function names.
- Export functions and a variable to enable embedding of ko's `publish` functionality to be embedded in other tools. See GoogleContainerTools/skaffold#5611 - Remove DockerRepo PublishOption and flag. This removes the `DockerRepo` config option and `--docker-repo` flag from the PR. New PR with the extracted config option: #351 - Fix copyright headers for boilerplate check. - Use DockerRepo PublishOption instead of env var. - Override defaultBaseImage using BuildOptions. Remove exported package global SetDefaultBaseImage and instead allow programmatic override of the default base image using the field `BaseImage` in `options.BuildOptions`. Also fix copyright header years. - Add BuildOptions parameter to getBaseImage This enables access to BaseImage for programmatically overriding the default base image from `.ko.yaml`. - Add UserAgent to BuildOptions and PublishOptions This enables programmatically overriding the `User-Agent` HTTP request header for both pulling the base image and pushing the built image. - Rename MakeBuilder to NewBuilder and MakePublisher to NewPublisher. For more idiomatic constructor function names.
This enables programmatically setting the destination image repository
when embedding ko's
publish
functionality in other tools.See discussion in #348 for additional context.