Skip to content

feat: Add global env #1305

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

Closed
nmittler opened this issue May 10, 2024 · 0 comments · Fixed by #1310
Closed

feat: Add global env #1305

nmittler opened this issue May 10, 2024 · 0 comments · Fixed by #1310

Comments

@nmittler
Copy link
Contributor

If there are common environment variables used in each build in .ko.yaml, this can creates a lot of boilerplate. It would be better to allow a set of global variables at the top, that will automatically available to each build as its generated.

I suspect the order they should appear in the aggregate list is as follows:

  • os.Eniviron
  • global env
  • per-build env

Happy to do the work, if folks think this is a good idea.

@nmittler nmittler changed the title Add global env feat: Add global env May 10, 2024
nmittler added a commit to nmittler/ko that referenced this issue May 14, 2024
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 ko-build#1305

Signed-off-by: Nathan Mittler <[email protected]>
nmittler added a commit to nmittler/ko that referenced this issue May 14, 2024
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 ko-build#1305

Signed-off-by: Nathan Mittler <[email protected]>
nmittler added a commit to nmittler/ko that referenced this issue May 14, 2024
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 ko-build#1305

Signed-off-by: Nathan Mittler <[email protected]>
nmittler added a commit to nmittler/ko that referenced this issue May 14, 2024
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 ko-build#1305

Signed-off-by: Nathan Mittler <[email protected]>
nmittler added a commit to nmittler/ko that referenced this issue May 14, 2024
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 ko-build#1305

Signed-off-by: Nathan Mittler <[email protected]>
nmittler added a commit to nmittler/ko that referenced this issue May 17, 2024
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 ko-build#1305

Signed-off-by: Nathan Mittler <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant