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

add env vars to pipeline strategy #12323

Merged
merged 1 commit into from
Feb 25, 2017
Merged

Conversation

bparees
Copy link
Contributor

@bparees bparees commented Dec 21, 2016

No description provided.

@bparees bparees changed the title add env vars to pipeline strategy [DO_NOT_MERGE] add env vars to pipeline strategy Dec 21, 2016
@bparees
Copy link
Contributor Author

bparees commented Dec 21, 2016

this can't be merged until the sync plugin is updated to consume these values, but would like to get @openshift/api-review approval rolling.

@@ -616,6 +616,9 @@ type JenkinsPipelineBuildStrategy struct {

// Jenkinsfile defines the optional raw contents of a Jenkinsfile which defines a Jenkins pipeline build.
Jenkinsfile string

// Env contains additional environment variables you want to pass into a build pipeline
Env []kapi.EnvVar
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the full power supported? (ValueFrom, etc). If not, document or limit via validation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is not currently (the other env fields for other strategies don't support the full power either, we have a card for that).

i'm not sure if we can ever reasonably support the full power in this case, it would require us doing awkward things like resolving the value before sending the build object to the sync plugin, which i dislike (similar to the awkward things we're doing w/ imagestreams today). (I would not want to make the sync plugin responsible for resolving the value)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

doc updated.

Copy link
Contributor

Choose a reason for hiding this comment

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

The problem with validation would be breaking anyone who already set it. But adding validation when we create a field is ok. I'll give it a pass for now.

@bparees bparees force-pushed the pipeline_env branch 2 times, most recently from c37bbc8 to 064daf7 Compare December 21, 2016 22:18
@smarterclayton
Copy link
Contributor

Jordan if you want to make a case for validation I'm ok with it either way.

@liggitt
Copy link
Contributor

liggitt commented Jan 3, 2017

Jordan if you want to make a case for validation I'm ok with it either way.

I'd rather prevent the API from accepting data that will a) not behave as expected (since we don't hook up valueFrom stuff), and b) sit inertly and spring into action if we ever do add valueFrom behavior in the future

I don't care strongly if that is done via a separate type that omits valueFrom or via validation that prevents it from being set

@bparees
Copy link
Contributor Author

bparees commented Jan 4, 2017

I'd rather prevent the API from accepting data that will a) not behave as expected (since we don't hook up valueFrom stuff), and b) sit inertly and spring into action if we ever do add valueFrom behavior in the future

ok, i'll plan to add validation to prevent valueFrom on this new field only (as @smarterclayton said, we can't start blocking it on the existing fields, so if/when we get around to supporting it we're still going to have the case of it suddenly springing to life on those fields).

@bparees
Copy link
Contributor Author

bparees commented Jan 4, 2017

@openshift/api-review i've updated this PR to add validation logic for the env field on pipeline strategies (block use of envVar)

@liggitt
Copy link
Contributor

liggitt commented Jan 4, 2017

thanks, LGTM

@bparees
Copy link
Contributor Author

bparees commented Jan 11, 2017

As it turns out we actually have already been enforcing that valueFrom can't be used in the other strategies. So we're in good shape there, at least.

@openshift-bot openshift-bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jan 11, 2017
@openshift-bot openshift-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 10, 2017
@gabemontero
Copy link
Contributor

@bparees - is it reasonable to assume that once the 3.5 branch is cut, and master transitions to hosting 3.6 work, that this PR can be rebased and then merged?

@bparees
Copy link
Contributor Author

bparees commented Feb 16, 2017

@gabemontero yes

@gabemontero
Copy link
Contributor

@bparees bump rebase/merge ? thanks

@openshift-bot openshift-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 24, 2017
@bparees bparees changed the title [DO_NOT_MERGE] add env vars to pipeline strategy add env vars to pipeline strategy Feb 24, 2017
@bparees
Copy link
Contributor Author

bparees commented Feb 24, 2017

[merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 4bfdac8

@openshift-bot
Copy link
Contributor

[Test]ing while waiting on the merge queue

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 4bfdac8

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_future/559/) (Base Commit: f984cc7)

@openshift-bot
Copy link
Contributor

openshift-bot commented Feb 25, 2017

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_future/568/) (Base Commit: bc6686d) (Image: devenv-rhel7_5982)

@openshift-bot openshift-bot merged commit d757d20 into openshift:master Feb 25, 2017
@bparees bparees deleted the pipeline_env branch February 27, 2017 04:44
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