* another docs update
- remove duplicate content from README.md
- mention CNCF announcement in README and index.md
- mention Kyverno adoption
- drop broken ko deps link
- mention SBOMs and multi-platform in intro section
* rename k8s slack channel
* ci: build and test using 1.18 and 1.19 (drop 1.17)
* remove pre-1.18 compat code, update README
* go install goimports before checkout
* update chainguard-dev/actions to versions that go install
This adds implicit support for Google, Amazon, Azure and GitHub
container registries if the environment provides credentials.
Binary size increases from 22 MB -> 26 MB
* Add .ko.yaml to base ko container image on golang:1.17
Ignore this in e2e tests, since even though golang:1.17 provides a
Windows base image, ko's base image platform selection doesn't take
osversion into account. The e2e tests don't exercise golang usage at
all, so it shouldn't matter.
* Update README
* Use default `completion` command provided by cobra.
`cobra` provides default `completion` subcommand.
It supports bash, zsh, fish, and powershell by default.
* update docs
* Add build config usage log statement
There is currently no indication whether `ko` picks one of the configured
build configurations from the `.ko.yaml` configuration file for a build.
Add log statement to print the build config being picked for the build.
Introduce default entry for build config `ID` in case it is not specified.
* Add path check for build configuration settings
Add `os.Stat` to verify that the path that is configured in the build
configuration entry is valid. As a side effect, this will print out an error
message in case someone sets an import path like `github.com/google/ko` in
the `main` field of the build config.
* Fix trimpath command line flag in README
Fixed wrong command line flag `--trimpath` to `-trimpath`.
Ensure that the directory specified in build configs in `.ko.yaml` is
used to:
1. Load module information
2. Resolve local paths to Go import paths
3. Working directory for compilation
The change achieves this by introducing `gobuilds`, which contains a
map of import path to `build.Interface` instances. Each entry maps to a
`builds` entry from `.ko.yaml`. `gobuilds` dispatches to the builder
instances based on the requested import path, and falls back to a
default builder if there's no match.
Thanks to @jonjohnsonjr for the suggestions in
https://github.com/google/ko/issues/422#issuecomment-909408527
Also removes mutable globals in the `commands` package.
Fixes: #422
* Update the OpenShift documentation url to use latest instead of a specific version.
* Use `openshift registry info --public` to get registry public URL
I got the following error when following the original instructions:
go install: version is required when current directory is not in a module
Try 'go install github.com/google/ko@latest' to install the latest version
* Build working Windows container images
Add e2e tests that run on Windows and cover kodata behavior
* now successfully skipping symlinks on windows :-/
* fix e2e test on windows, that relied on a symlink in kodata after all
* document windows symlink issue
* review feedback
* re-add kodata symlink tests for linux
There are use cases, where multiple Go build flags need to be set. However, the
environment variable to pass flags to Go build has some limits for `ldFlags`.
Add GoReleaser inspired configuration section to `.ko.yaml` to support setting
specific Go build and ldFlags to be used by the build. Like GoReleaser the
content of the configuration can use Go templates. Currently, only a section
for environment variables is included.
In order to reduce dependency overhead, only the respective config structs from
https://github.com/goreleaser/goreleaser/blob/master/pkg/config/config.go are
used internally to load from `.ko.yaml`.