Skip to content
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

fix: Simplify merging and fix override of top level env vars #3679

Conversation

abayer
Copy link
Contributor

@abayer abayer commented Apr 18, 2019

Submitter checklist

  • Change is code complete and matches issue description.
  • Change is covered by existing or new tests.

Description

Derived from what I've done over at tektoncd/pipeline#767 - this is just cleaner, simpler, better.

Special notes for the reviewer(s)

/assign @dwnusbaum

Which issue this PR fixes

n/a

@abayer
Copy link
Contributor Author

abayer commented Apr 18, 2019

/hold

Working on folding a fix for env vars in pod template containers not being overridden by pipeline/stage env vars here now.

@abayer abayer force-pushed the switch-to-strategicpatch-merge-for-containeroptions branch from cbe9705 to a05367e Compare April 18, 2019 17:42
func scopedEnv(newEnv []corev1.EnvVar, parentEnv []corev1.EnvVar, o *RootOptions) []corev1.EnvVar {
// AddContainerEnvVarsToPipeline allows for adding a slice of container environment variables directly to the
// pipeline, if they're not already defined.
func (p *ParsedPipeline) AddContainerEnvVarsToPipeline(origEnv []corev1.EnvVar) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

receiver name p should be consistent with previous receiver name j for ParsedPipeline

@abayer abayer changed the title chore: Simplify merging of container options and environment fix: Simplify merging and fix override of top level env vars Apr 18, 2019
Derived from what I've done over at
tektoncd/pipeline#767 - this is just cleaner,
simpler, better.
@abayer abayer force-pushed the switch-to-strategicpatch-merge-for-containeroptions branch from a05367e to 3406b37 Compare April 18, 2019 17:43
@abayer
Copy link
Contributor Author

abayer commented Apr 18, 2019

/hold cancel
/assign @jstrachan

Ok, fix for pipelineConfig level env not overriding pod template container env is in here now too.

@jstrachan
Copy link
Member

/lgtm

@jenkins-x-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jstrachan

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jenkins-x-bot jenkins-x-bot merged commit 5e9ee91 into jenkins-x:master Apr 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants