-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Throw error using --context-dir with a template #15019
Throw error using --context-dir with a template #15019
Conversation
[test][testextended][extended:core(builds)] |
@bparees ptal |
pkg/generate/app/cmd/newapp.go
Outdated
|
||
if len(c.ContextDir) > 0 && len(c.TemplateFiles) > 0 { | ||
return nil, errors.New("--context-dir is not supported when using a template") | ||
} |
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.
just to confirm, c.TemplateFiles is populated for all of the following conditions:
- "oc new-app mylocaltemplate.yaml"
- "oc new-app -f mylocaltemplate.yaml"
- "oc new-app http://myremote/template.yaml"
- "oc new-app -f http://myremote/template.yaml"
- "oc new-app myclustertemplate"
?
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.
Doesn't look like it, fixed in next push
what does this actually output when a user hits it? |
@bparees --context-dir is not supported when using a template |
@coreydaley i mean the literal output. i want to see what the user is going to see in terms of full output based on where you're throwing the error. |
[09:49] $ oc new-app rails-postgresql.json --context-dir=blah |
lgtm, please add a TC to newapp.sh |
test/flake #14575 |
[merge] |
--context-dir is not supported when using a template with oc new-app Fixes #14960
Evaluated for origin test up to 0a4fc41 |
[merge] |
Evaluated for origin testextended up to 0a4fc41 |
continuous-integration/openshift-jenkins/test FAILURE (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin/2970/) (Base Commit: be5e626) (PR Branch Commit: 0a4fc41) |
flake #15059 |
continuous-integration/openshift-jenkins/testextended SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin_extended/820/) (Base Commit: be5e626) (PR Branch Commit: 0a4fc41) (Extended Tests: core(builds)) |
[merge][severity:lowrisk] |
Evaluated for origin merge up to 0a4fc41 |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin/1237/) (Base Commit: 72b9f3d) (PR Branch Commit: 0a4fc41) (Image: devenv-rhel7_6427) |
--context-dir is not supported when using a template with oc new-app
Fixes #14960