When trying out these examples, it is easier to have a deployment that can be copied and quickly tested. I don't think it adds too much clutter and it definitely saves people to troubleshoot why what they copied from the site doesn't work.
This adds a new build flag for setting annotations
on image indexes and manifests.
Annotations are no longer copied from the base image.
`org.opencontainers.image.base.digest` and
`org.opencontainers.image.base.name`
are always set to the resolved values.
Usage example:
```sh
ko build --image-annotation foo=bar,fizz=buzz .
```
Fixes#1090Fixes#1090Fixes#1231Fixes#1235Fixes#1395
There was recent work to add global values for `env`, `flags`, and `ldflags`. The global values would be merged with per-build values to generate the value used for the builds.
There are a couple issues with this:
- It's inconsistent with the existing code, which only has `default` values declared globally (there is no merging today).
- The name of the `flag` variable, caused a conflict with knative's `KO_FLAGS` environment variable (see #1317)
This PR does the following:
- Refactors the logic to use `defaultEnv`, `defaultFlags`, and `defaultLdflags`. This resolves both issues described above.
- Updates documentation
Fixes#1317
This restructures the build logic in order to expand the buildArgs to include:
- `Env`: the actual environment variables used to execute the build. This includes platform info (e.g. `GOOS`, `GOARCH`).
- `GoEnv`: the map of variables from `go env`, but overridden with any platform-specific values defined in `Env`.
Fixes#1301
Signed-off-by: Nathan Mittler <nmittler@aviatrix.com>
This includes a number of template parameters supported by [goreleaser](https://goreleaser.com/customization/templates/). Specifically, the build date information and the majority of the Git params.
Majority of the code is copied from goreleaser. I've added the MIT license from goreleaser at the top of the files.
Fixes#493
Signed-off-by: Nathan Mittler <nmittler@aviatrix.com>
Supports configuring global `env` variables that will be applied to all builds.
Modifies the `builder` function to accept a `buildContext` structure. This will simplify similar modifications in the future.
Fixes#1305
Signed-off-by: Nathan Mittler <nmittler@aviatrix.com>
* 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