{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/origin/pulls/comments/76071665","id":76071665,"diff_hunk":"@@ -42,31 +36,10 @@ func (h *Helper) InstallFlags(flags *pflag.FlagSet) {\n // from the local dockercfg file\n func (h *Helper) GetDockerAuth(imageName, authType string) (docker.AuthConfiguration, bool) {\n \tglog.V(3).Infof(\"Locating docker auth for image %s and type %s\", imageName, authType)\n-\tvar dockercfgPath string\n-\tif pathForAuthType := os.Getenv(authType); len(pathForAuthType) > 0 {\n-\t\tdockercfgPath = GetDockercfgFile(pathForAuthType)\n-\t} else {\n-\t\tdockercfgPath = GetDockercfgFile(\"\")\n-\t}\n-\tif len(dockercfgPath) == 0 {\n-\t\tglog.V(3).Infof(\"Could not locate a docker config file\")\n-\t\treturn docker.AuthConfiguration{}, false\n-\t}\n-\tif _, err := os.Stat(dockercfgPath); err != nil {\n-\t\tglog.V(3).Infof(\"Problem accessing %s: %v\", dockercfgPath, err)\n-\t\treturn docker.AuthConfiguration{}, false\n-\t}\n-\n-\tvar cfg credentialprovider.DockerConfig\n-\tvar err error\n-\tif strings.HasSuffix(dockercfgPath, kapi.DockerConfigJsonKey) || strings.HasSuffix(dockercfgPath, \"config.json\") {\n-\t\tcfg, err = readDockerConfigJson(dockercfgPath)\n-\t} else if strings.HasSuffix(dockercfgPath, kapi.DockerConfigKey) {\n-\t\tcfg, err = readDockercfg(dockercfgPath)\n-\t}\n \n+\tcfg, err := credentialprovider.ReadDockerConfigFile()","path":"pkg/build/builder/cmd/dockercfg/cfg.go","position":51,"original_position":51,"commit_id":"3470bb50a55103a65d0ce253e4a894a75e46b9f5","original_commit_id":"3470bb50a55103a65d0ce253e4a894a75e46b9f5","user":{"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},"body":"you've deleted the logic that determines what path we actually look for the credential file in, based on the value of the authType env variable.\r\n\r\n","created_at":"2016-08-24T14:51:24Z","updated_at":"2016-08-24T14:51:24Z","html_url":"https://github.com/openshift/origin/pull/10608#discussion_r76071665","pull_request_url":"https://api.github.com/repos/openshift/origin/pulls/10608","_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments/76071665"},"html":{"href":"https://github.com/openshift/origin/pull/10608#discussion_r76071665"},"pull_request":{"href":"https://api.github.com/repos/openshift/origin/pulls/10608"}}},"pull_request":{"url":"https://api.github.com/repos/openshift/origin/pulls/10608","id":82491475,"html_url":"https://github.com/openshift/origin/pull/10608","diff_url":"https://github.com/openshift/origin/pull/10608.diff","patch_url":"https://github.com/openshift/origin/pull/10608.patch","issue_url":"https://api.github.com/repos/openshift/origin/issues/10608","number":10608,"state":"open","locked":false,"title":"use kubernetes public func to get docker auth","user":{"login":"guangxuli","id":17472298,"avatar_url":"https://avatars.githubusercontent.com/u/17472298?v=3","gravatar_id":"","url":"https://api.github.com/users/guangxuli","html_url":"https://github.com/guangxuli","followers_url":"https://api.github.com/users/guangxuli/followers","following_url":"https://api.github.com/users/guangxuli/following{/other_user}","gists_url":"https://api.github.com/users/guangxuli/gists{/gist_id}","starred_url":"https://api.github.com/users/guangxuli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guangxuli/subscriptions","organizations_url":"https://api.github.com/users/guangxuli/orgs","repos_url":"https://api.github.com/users/guangxuli/repos","events_url":"https://api.github.com/users/guangxuli/events{/privacy}","received_events_url":"https://api.github.com/users/guangxuli/received_events","type":"User","site_admin":false},"body":"in kubernetes：\r\nhttps://github.com/kubernetes/kubernetes/commit/0c5d9ed0d21f0ebace1b5bd437077bc6f6e070f2\r\nthis commit have move `pkg/kubelet/dockertools/config.go` to  `pkg/credentialprovider/config.go`\r\nand the func `readDockerConfigFile() `have changed to public `ReadDockerConfigFile()`\r\n\r\nin our code now, we can directly use this function to get docker config info, and add the test case.","created_at":"2016-08-24T07:05:37Z","updated_at":"2016-08-24T14:51:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0d33a263affe6cda02c0a02bbb8b497a53f3275a","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},"assignees":[{"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,"commits_url":"https://api.github.com/repos/openshift/origin/pulls/10608/commits","review_comments_url":"https://api.github.com/repos/openshift/origin/pulls/10608/comments","review_comment_url":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/origin/issues/10608/comments","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/3470bb50a55103a65d0ce253e4a894a75e46b9f5","head":{"label":"guangxuli:openshift_use_k8s_func","ref":"openshift_use_k8s_func","sha":"3470bb50a55103a65d0ce253e4a894a75e46b9f5","user":{"login":"guangxuli","id":17472298,"avatar_url":"https://avatars.githubusercontent.com/u/17472298?v=3","gravatar_id":"","url":"https://api.github.com/users/guangxuli","html_url":"https://github.com/guangxuli","followers_url":"https://api.github.com/users/guangxuli/followers","following_url":"https://api.github.com/users/guangxuli/following{/other_user}","gists_url":"https://api.github.com/users/guangxuli/gists{/gist_id}","starred_url":"https://api.github.com/users/guangxuli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guangxuli/subscriptions","organizations_url":"https://api.github.com/users/guangxuli/orgs","repos_url":"https://api.github.com/users/guangxuli/repos","events_url":"https://api.github.com/users/guangxuli/events{/privacy}","received_events_url":"https://api.github.com/users/guangxuli/received_events","type":"User","site_admin":false},"repo":{"id":62598993,"name":"origin","full_name":"guangxuli/origin","owner":{"login":"guangxuli","id":17472298,"avatar_url":"https://avatars.githubusercontent.com/u/17472298?v=3","gravatar_id":"","url":"https://api.github.com/users/guangxuli","html_url":"https://github.com/guangxuli","followers_url":"https://api.github.com/users/guangxuli/followers","following_url":"https://api.github.com/users/guangxuli/following{/other_user}","gists_url":"https://api.github.com/users/guangxuli/gists{/gist_id}","starred_url":"https://api.github.com/users/guangxuli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guangxuli/subscriptions","organizations_url":"https://api.github.com/users/guangxuli/orgs","repos_url":"https://api.github.com/users/guangxuli/repos","events_url":"https://api.github.com/users/guangxuli/events{/privacy}","received_events_url":"https://api.github.com/users/guangxuli/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/guangxuli/origin","description":"Enterprise-Ready Kubernetes for Developers","fork":true,"url":"https://api.github.com/repos/guangxuli/origin","forks_url":"https://api.github.com/repos/guangxuli/origin/forks","keys_url":"https://api.github.com/repos/guangxuli/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guangxuli/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guangxuli/origin/teams","hooks_url":"https://api.github.com/repos/guangxuli/origin/hooks","issue_events_url":"https://api.github.com/repos/guangxuli/origin/issues/events{/number}","events_url":"https://api.github.com/repos/guangxuli/origin/events","assignees_url":"https://api.github.com/repos/guangxuli/origin/assignees{/user}","branches_url":"https://api.github.com/repos/guangxuli/origin/branches{/branch}","tags_url":"https://api.github.com/repos/guangxuli/origin/tags","blobs_url":"https://api.github.com/repos/guangxuli/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guangxuli/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guangxuli/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/guangxuli/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guangxuli/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/guangxuli/origin/languages","stargazers_url":"https://api.github.com/repos/guangxuli/origin/stargazers","contributors_url":"https://api.github.com/repos/guangxuli/origin/contributors","subscribers_url":"https://api.github.com/repos/guangxuli/origin/subscribers","subscription_url":"https://api.github.com/repos/guangxuli/origin/subscription","commits_url":"https://api.github.com/repos/guangxuli/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/guangxuli/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/guangxuli/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/guangxuli/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/guangxuli/origin/contents/{+path}","compare_url":"https://api.github.com/repos/guangxuli/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guangxuli/origin/merges","archive_url":"https://api.github.com/repos/guangxuli/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guangxuli/origin/downloads","issues_url":"https://api.github.com/repos/guangxuli/origin/issues{/number}","pulls_url":"https://api.github.com/repos/guangxuli/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/guangxuli/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/guangxuli/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guangxuli/origin/labels{/name}","releases_url":"https://api.github.com/repos/guangxuli/origin/releases{/id}","deployments_url":"https://api.github.com/repos/guangxuli/origin/deployments","created_at":"2016-07-05T02:11:50Z","updated_at":"2016-07-05T02:11:58Z","pushed_at":"2016-08-24T08:16:23Z","git_url":"git://github.com/guangxuli/origin.git","ssh_url":"git@github.com:guangxuli/origin.git","clone_url":"https://github.com/guangxuli/origin.git","svn_url":"https://github.com/guangxuli/origin","homepage":"http://www.openshift.org","size":321022,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openshift:master","ref":"master","sha":"0d18143375aab9f9b6b1c4223c292101afa8a37c","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":22442668,"name":"origin","full_name":"openshift/origin","owner":{"login":"openshift","id":792337,"avatar_url":"https://avatars.githubusercontent.com/u/792337?v=3","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/origin","description":"Enterprise-Ready Kubernetes for Developers","fork":false,"url":"https://api.github.com/repos/openshift/origin","forks_url":"https://api.github.com/repos/openshift/origin/forks","keys_url":"https://api.github.com/repos/openshift/origin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/origin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/origin/teams","hooks_url":"https://api.github.com/repos/openshift/origin/hooks","issue_events_url":"https://api.github.com/repos/openshift/origin/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/origin/events","assignees_url":"https://api.github.com/repos/openshift/origin/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/origin/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/origin/tags","blobs_url":"https://api.github.com/repos/openshift/origin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/origin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/origin/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/origin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/origin/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/origin/languages","stargazers_url":"https://api.github.com/repos/openshift/origin/stargazers","contributors_url":"https://api.github.com/repos/openshift/origin/contributors","subscribers_url":"https://api.github.com/repos/openshift/origin/subscribers","subscription_url":"https://api.github.com/repos/openshift/origin/subscription","commits_url":"https://api.github.com/repos/openshift/origin/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/origin/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/origin/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/origin/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/origin/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/origin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/origin/merges","archive_url":"https://api.github.com/repos/openshift/origin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/origin/downloads","issues_url":"https://api.github.com/repos/openshift/origin/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/origin/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/origin/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/origin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/origin/labels{/name}","releases_url":"https://api.github.com/repos/openshift/origin/releases{/id}","deployments_url":"https://api.github.com/repos/openshift/origin/deployments","created_at":"2014-07-30T20:04:05Z","updated_at":"2016-08-24T10:16:03Z","pushed_at":"2016-08-24T14:49:50Z","git_url":"git://github.com/openshift/origin.git","ssh_url":"git@github.com:openshift/origin.git","clone_url":"https://github.com/openshift/origin.git","svn_url":"https://github.com/openshift/origin","homepage":"http://www.openshift.org","size":571592,"stargazers_count":1622,"watchers_count":1622,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1020,"mirror_url":null,"open_issues_count":1070,"forks":1020,"open_issues":1070,"watchers":1622,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/origin/pulls/10608"},"html":{"href":"https://github.com/openshift/origin/pull/10608"},"issue":{"href":"https://api.github.com/repos/openshift/origin/issues/10608"},"comments":{"href":"https://api.github.com/repos/openshift/origin/issues/10608/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/origin/pulls/10608/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/origin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/origin/pulls/10608/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/origin/statuses/3470bb50a55103a65d0ce253e4a894a75e46b9f5"}}}}
{"actor":{"display_login":"bparees"}}