{"action":"created","issue":{"url":"https://api.github.com/repos/openshift/origin/issues/6615","labels_url":"https://api.github.com/repos/openshift/origin/issues/6615/labels{/name}","comments_url":"https://api.github.com/repos/openshift/origin/issues/6615/comments","events_url":"https://api.github.com/repos/openshift/origin/issues/6615/events","html_url":"https://github.com/openshift/origin/pull/6615","id":126149553,"number":6615,"title":"Make new-build output single BuildConfig with multiple sources","user":{"login":"rhcarvalho","id":88819,"avatar_url":"https://avatars.githubusercontent.com/u/88819?v=3","gravatar_id":"","url":"https://api.github.com/users/rhcarvalho","html_url":"https://github.com/rhcarvalho","followers_url":"https://api.github.com/users/rhcarvalho/followers","following_url":"https://api.github.com/users/rhcarvalho/following{/other_user}","gists_url":"https://api.github.com/users/rhcarvalho/gists{/gist_id}","starred_url":"https://api.github.com/users/rhcarvalho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rhcarvalho/subscriptions","organizations_url":"https://api.github.com/users/rhcarvalho/orgs","repos_url":"https://api.github.com/users/rhcarvalho/repos","events_url":"https://api.github.com/users/rhcarvalho/events{/privacy}","received_events_url":"https://api.github.com/users/rhcarvalho/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-01-12T10:38:36Z","updated_at":"2016-01-12T16:04:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/6615","html_url":"https://github.com/openshift/origin/pull/6615","diff_url":"https://github.com/openshift/origin/pull/6615.diff","patch_url":"https://github.com/openshift/origin/pull/6615.patch"},"body":"This makes it possible to use the `--dockerfile` option in conjunction with a Git source repo argument:\r\n\r\n```console\r\n$ oc new-build https://github.com/rhcarvalho/chained-builds-ex/ --context-dir=app -D $'FROM rhcarvalho/httphostname\\nENV ok=1' -o yaml\r\n```\r\n\r\nWill output a single BC with two sources:\r\n\r\n```yaml\r\n....\r\n  spec:\r\n    output:\r\n      to:\r\n        kind: ImageStreamTag\r\n        name: chained-builds-ex:latest\r\n    resources: {}\r\n    source:\r\n      contextDir: app\r\n      dockerfile: |-\r\n        FROM rhcarvalho/httphostname\r\n        ENV ok=1\r\n      git:\r\n        uri: https://github.com/rhcarvalho/chained-builds-ex/\r\n      type: Git\r\n    strategy:\r\n      dockerStrategy:\r\n        from:\r\n          kind: DockerImage\r\n          name: rhcarvalho/httphostname\r\n      type: Docker\r\n....\r\n```\r\n\r\nIt is an error to use `--dockerfile` with two or more repositories (new behavior). It can be used without a source repo, and will create a BC that builds from a Dockerfile (no changes).\r\n\r\nFixes #6199."},"comment":{"url":"https://api.github.com/repos/openshift/origin/issues/comments/170958490","html_url":"https://github.com/openshift/origin/pull/6615#issuecomment-170958490","issue_url":"https://api.github.com/repos/openshift/origin/issues/6615","id":170958490,"user":{"login":"mfojtik","id":44136,"avatar_url":"https://avatars.githubusercontent.com/u/44136?v=3","gravatar_id":"","url":"https://api.github.com/users/mfojtik","html_url":"https://github.com/mfojtik","followers_url":"https://api.github.com/users/mfojtik/followers","following_url":"https://api.github.com/users/mfojtik/following{/other_user}","gists_url":"https://api.github.com/users/mfojtik/gists{/gist_id}","starred_url":"https://api.github.com/users/mfojtik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfojtik/subscriptions","organizations_url":"https://api.github.com/users/mfojtik/orgs","repos_url":"https://api.github.com/users/mfojtik/repos","events_url":"https://api.github.com/users/mfojtik/events{/privacy}","received_events_url":"https://api.github.com/users/mfojtik/received_events","type":"User","site_admin":false},"created_at":"2016-01-12T16:04:46Z","updated_at":"2016-01-12T16:04:46Z","body":"most likely assets flake"}}