-
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
feat: Add platform template parameters #1301
Comments
nmittler
changed the title
Expose additional template parameters
Expose platform information via template parameters
May 9, 2024
nmittler
added a commit
to nmittler/ko
that referenced
this issue
May 9, 2024
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 ko-build#1301
FYI I put together a potential fix: #1302 |
nmittler
added a commit
to nmittler/ko
that referenced
this issue
May 9, 2024
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 ko-build#1301
nmittler
added a commit
to nmittler/ko
that referenced
this issue
May 10, 2024
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 ko-build#1301 Signed-off-by: Nathan Mittler <nmittler@aviatrix.com>
nmittler
added a commit
to nmittler/ko
that referenced
this issue
May 10, 2024
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 ko-build#1301 Signed-off-by: Nathan Mittler <nmittler@aviatrix.com>
nmittler
changed the title
Expose platform information via template parameters
Add platform template parameters
May 10, 2024
nmittler
changed the title
Add platform template parameters
feat: Add platform template parameters
May 10, 2024
nmittler
added a commit
to nmittler/ko
that referenced
this issue
May 12, 2024
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 ko-build#1301 Signed-off-by: Nathan Mittler <nmittler@aviatrix.com>
nmittler
added a commit
to nmittler/ko
that referenced
this issue
May 15, 2024
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 ko-build#1301 Signed-off-by: Nathan Mittler <nmittler@aviatrix.com>
nmittler
added a commit
to nmittler/ko
that referenced
this issue
May 15, 2024
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 ko-build#1301 Signed-off-by: Nathan Mittler <nmittler@aviatrix.com>
nmittler
added a commit
to nmittler/ko
that referenced
this issue
May 15, 2024
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 ko-build#1301 Signed-off-by: Nathan Mittler <nmittler@aviatrix.com>
imjasonh
pushed a commit
that referenced
this issue
May 15, 2024
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>
nmittler
added a commit
to nmittler/ko
that referenced
this issue
May 15, 2024
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 ko-build#1301 Signed-off-by: Nathan Mittler <nmittler@aviatrix.com>
nmittler
added a commit
to nmittler/ko
that referenced
this issue
May 17, 2024
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 ko-build#1301 Signed-off-by: Nathan Mittler <nmittler@aviatrix.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It seems that ko follows goreleaser's approach for providing template parameters for environment variables (
{{ .Env.XXX }}
. However, it would useful to have build-specific parameters accessible as well. One good example is providing accessGOOS
andGOARCH
used to build a given binary (e.g.{{ .GOOS }}
}. AFAICT from the current docs, this isn't available today.The text was updated successfully, but these errors were encountered: