-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Adding --build-env and --build-env-file to oc new-app #12455
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
Adding --build-env and --build-env-file to oc new-app #12455
Conversation
@openshift/cli-review ptal |
[test] |
return nil, nil, err | ||
return nil, nil, nil, err | ||
} | ||
buildEnv, err := app.ParseAndCombineEnvironment(c.BuildEnvironment, c.BuildEnvironmentFiles, c.In, func(key, file string) error { |
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.
this isn't going to work if i invoke "oc new-build --env", is it?
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.
(or --env-file)
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.
GetBuildEnvironment calls c.validate() which returns the data there, which is called by the pipeline builder on line 285. I could probably refactor the code there to to remove passing environment to GetBuildEnvironment since it's not used anymore.
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.
I don't see where you're including the value of the "--env" parameter when running "oc new-build".
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.
anything passed to --env is being stored in the &config.BuildEnvironment, which is used as c.BuildEnvironment here.
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.
got it, thanks i missed the change to the field being used by the --env.
Evaluated for origin test up to f05aedf |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/12864/) (Base Commit: b7ed175) |
lgtm, awaiting @openshift/cli-review approval. |
LGTM |
[merge] |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/12864/) (Image: devenv-rhel7_5690) |
Evaluated for origin merge up to f05aedf |
Adding new flags (--build-env and --build-env-file) to facilitate adding environment variables to the build config at app creation instead of having to stop the build, and create a new build with the environment variables.
Also adding --build-env and --build-env-file (as hidden) flags to oc new-build (as "aliases").