-
Notifications
You must be signed in to change notification settings - Fork 113
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
SHIP-0004: Build Environment Variables #817
SHIP-0004: Build Environment Variables #817
Conversation
@coreydaley can we close this one? see shipwright-io/community#10 ( is already merged ) |
This is the implementation for shipwright-io/community#10 ... |
@coreydaley my bad, thanks for the clarification |
/retest |
/assign @adambkaplan @gabemontero @otaviof |
/assign @SaschaSchwarze0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good, but given this is a substantial feature this PR needs:
- Doc updates for our Build and BuildRun APIs.
- A release note block in the PR description.
Working on the |
Documentation update: shipwright-io/website#53 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a couple of bigger macro items @coreydaley @adambkaplan that came to my mind, including perhaps missing a key element of type during the SHIP review
Looks like a networking issue:
@adambkaplan Can I get a retest? |
@coreydaley for future reference I think you can mention @shipwright-io/build-reviewers, and anyone on that team will be able to rerun any GitHub action by clicking on the details. You may be also able to re-run the GitHub action as the PR author since technically the tests run against your fork. |
I will keep that in mind. I was not able to rerun the tests. |
I don't think that adding additional documentation to support valueFrom with the EnvVars would be an issue, and it should flow through to tekton seamlessly. Additional supporting tests should not be an issue either. |
the meets min for me would be doc and tests that address the various valueFrom paths with k8s env vars ... if those are added, and we are all good with supporting those scenarios, I'm good integration into so yeah @coreydaley pending any comeback from @adambkaplan about gettnig simpler here wrt env vars, start adding the additional env var permutations and we'll go from there |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Good work.
FYI, I am still working on the valueFrom stuff that was mentioned by @gabemontero during his review, and have not pushed those updates as of yet. |
Thanks, was assuming something like this. You may prefix your PR title with |
ok my bigger macro items have been addressed ... I will thus /approve given the collaboration I see in the commits between @coreydaley @HeavyWombat @shahulsonhal, as well as the review from @SaschaSchwarze0 I am going to defer the lgtm to one of them. Aside from their in depth involvement, it allows for the cross team etc. sign off we prefer. thanks everyone |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gabemontero The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, one mandatory item remaining regarding for which steps environment variables are set in the TaskSpec.
Beside that, two bonus items that we can also do in a later PR:
- In the build.md and buildrun.md, your examples for
valueFrom
are all working I guess, but are not covering a useful scenario, I think. A useful scenario could be to get an environment variable value forNPM_TOKEN
from a secret in the context of a Buildpacks or s2i build. - In the Build validation, we could add another check that verifies that an environment variable name does not colide with any step in the build strategy steps.
EDIT: and a third bonus item would be the validation of secrets and configmaps. We today validate that a referenced source secret, and output secret exist. We could validate the same for any secrets or configmaps referenced in environment variables.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My comment might be stupid, but I am coming from a decade of Java development where by-mistake-mutations-of-cached-objects was a quite often found issue and it was always a pain. Might not even apply here, so, if you tell me you're fully confident that your code is safe, I am also fine to take what you have.
Co-authored-by: Sascha Schwarze <schwarzs@de.ibm.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Changes
This pull request will give developers the abilty to add environment variables to build strategy steps. Conversely, this proposal will also give build strategy authors the ability to fix the values of environment variables in build steps or provide non-empty default values.
Submitter Checklist
See the contributor guide
for details on coding conventions, github and prow interactions, and the code review process.
Release Notes