-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Adds Env to TaskRunSpec #1657
Adds Env to TaskRunSpec #1657
Conversation
Adds a `Env` field to `TaskRunSpec` to allow a user to set environment variables on each step container. This mimics Knative-Build's `TemplateInstantiationSpec`'s `Env` field. Setting environment variables is useful for when a `TaskRun` author may not know what variables are required ahead of time (e.g., Buildpacks). fixes tektoncd#1606
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @poy. Thanks for your PR. I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test I need to think about how this interacts with |
/assign |
@imjasonh I followed the existing pattern established with implicitEnvVars hoping to do just that 😁 |
Thanks for the contribution @poy! Before we merge this, we should discuss the design and make sure we want to add this - as mentioned in #1606 (comment) this is something we have deliberately not added support for in the past, so I'd like to dig a bit more into the use case you described in #1606 (comment) so we can understand it a bit better before merging. /hold |
Hi everyone, it's nice to see some discussions and code changes on supporting dynamic environment variables. I would like to ask how can users support dynamic env through pipelineRun? |
Changes
Adds a
Env
field toTaskRunSpec
to allow a user to set environmentvariables on each step container. This mimics Knative-Build's
TemplateInstantiationSpec
'sEnv
field.Setting environment variables is useful for when a
TaskRun
author maynot know what variables are required ahead of time (e.g., Buildpacks).
fixes #1606
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Double check this list of stuff that's easy to miss:
cmd
dir, please updatethe release Task to build and release this image.
Reviewer Notes
If API changes are included, additive changes must be approved by at least two OWNERS and backwards incompatible changes must be approved by more than 50% of the OWNERS, and they must first be added in a backwards compatible way.
Release Notes