{"action":"created","issue":{"url":"https://api.github.com/repos/openshift/origin/issues/4980","labels_url":"https://api.github.com/repos/openshift/origin/issues/4980/labels{/name}","comments_url":"https://api.github.com/repos/openshift/origin/issues/4980/comments","events_url":"https://api.github.com/repos/openshift/origin/issues/4980/events","html_url":"https://github.com/openshift/origin/issues/4980","id":110137077,"number":4980,"title":"oc new-build should have a --to option that sets the name of the output image tag","user":{"login":"smarterclayton","id":1163175,"avatar_url":"https://avatars.githubusercontent.com/u/1163175?v=3","gravatar_id":"","url":"https://api.github.com/users/smarterclayton","html_url":"https://github.com/smarterclayton","followers_url":"https://api.github.com/users/smarterclayton/followers","following_url":"https://api.github.com/users/smarterclayton/following{/other_user}","gists_url":"https://api.github.com/users/smarterclayton/gists{/gist_id}","starred_url":"https://api.github.com/users/smarterclayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarterclayton/subscriptions","organizations_url":"https://api.github.com/users/smarterclayton/orgs","repos_url":"https://api.github.com/users/smarterclayton/repos","events_url":"https://api.github.com/users/smarterclayton/events{/privacy}","received_events_url":"https://api.github.com/users/smarterclayton/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/openshift/origin/labels/component/build","name":"component/build","color":"0052cc"},{"url":"https://api.github.com/repos/openshift/origin/labels/component/cli","name":"component/cli","color":"0052cc"},{"url":"https://api.github.com/repos/openshift/origin/labels/kind/enhancement","name":"kind/enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/openshift/origin/labels/priority/P2","name":"priority/P2","color":"fbca04"}],"state":"open","locked":false,"assignee":{"login":"bparees","id":4974046,"avatar_url":"https://avatars.githubusercontent.com/u/4974046?v=3","gravatar_id":"","url":"https://api.github.com/users/bparees","html_url":"https://github.com/bparees","followers_url":"https://api.github.com/users/bparees/followers","following_url":"https://api.github.com/users/bparees/following{/other_user}","gists_url":"https://api.github.com/users/bparees/gists{/gist_id}","starred_url":"https://api.github.com/users/bparees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bparees/subscriptions","organizations_url":"https://api.github.com/users/bparees/orgs","repos_url":"https://api.github.com/users/bparees/repos","events_url":"https://api.github.com/users/bparees/events{/privacy}","received_events_url":"https://api.github.com/users/bparees/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-10-07T01:51:10Z","updated_at":"2015-10-11T13:14:45Z","closed_at":null,"body":"It should be possible to do\r\n\r\n    oc new-build <source> --to=somenamespace/some:other\r\n\r\nwhich should define the build output image and this should work in concert with `--to-docker`.   It should also be possible to have no output for a build."},"comment":{"url":"https://api.github.com/repos/openshift/origin/issues/comments/147191767","html_url":"https://github.com/openshift/origin/issues/4980#issuecomment-147191767","issue_url":"https://api.github.com/repos/openshift/origin/issues/4980","id":147191767,"user":{"login":"smarterclayton","id":1163175,"avatar_url":"https://avatars.githubusercontent.com/u/1163175?v=3","gravatar_id":"","url":"https://api.github.com/users/smarterclayton","html_url":"https://github.com/smarterclayton","followers_url":"https://api.github.com/users/smarterclayton/followers","following_url":"https://api.github.com/users/smarterclayton/following{/other_user}","gists_url":"https://api.github.com/users/smarterclayton/gists{/gist_id}","starred_url":"https://api.github.com/users/smarterclayton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smarterclayton/subscriptions","organizations_url":"https://api.github.com/users/smarterclayton/orgs","repos_url":"https://api.github.com/users/smarterclayton/repos","events_url":"https://api.github.com/users/smarterclayton/events{/privacy}","received_events_url":"https://api.github.com/users/smarterclayton/received_events","type":"User","site_admin":false},"created_at":"2015-10-11T13:14:45Z","updated_at":"2015-10-11T13:14:45Z","body":"On Oct 11, 2015, at 9:07 AM, Rodolfo Carvalho <notifications@github.com>\nwrote:\n\nI have a few questions about how this interacts with the -D argument to\nnew-build.\n\nShould this create a BuildConfig without setting its Output.To field?\n\n$ oc new-build  -D $'FROM centos:7\\nRUN yum install -y httpd'\n\n\n\nNo, the output name should be centos:latest.  The input tag should be\ncentos:7\n\nIf the one liner was FROM centos, then the names would be identical and the\nCLI should display an error \"the default image output name for the build %q\nis the same as the source image location - specify a unique destination\nwith --to or change the name of your build with --name\"\n\n\nTo have a build output to an image stream from a oneliner Dockerfile, is it\nrequired to pass --to?\n\n$ oc new-build  -D $'FROM centos:7\\nRUN yum install -y httpd'\n--to=openshift/httpd:latest\n\nGiven that we should never come up with names the user has not provided,\nshall we replace this with an error or is it an exception and should stay\nas is?\nhttps://github.com/openshift/origin/blob/master/pkg/generate/app/pipeline.go#L45-L47\n<https://github.com/openshift/origin/blob/86b63beaabe05067afc066089f94a34bad367185/pkg/generate/app/pipeline.go#L45-L47>\n\n\n\nIt probably shouldn't be \"app%d\" but instead a typed error\n(NameRequiredForBuild), and the cli above it should report to the use \"you\nmust specify a name for your output image with --name\".\n"}}