{"action":"created","comment":{"url":"https://api.github.com/repos/ceph/ceph-build/pulls/comments/43146673","id":43146673,"diff_hunk":"@@ -6,6 +6,19 @@ if test -f /etc/redhat-release ; then\n     exit 0\n fi\n \n+[ \"$TEST\" = true ] && chacra_ref=\"$vers\" || chacra_ref=\"test\"\n+vers=`cat ./dist/version`\n+distro=`python -c \"exec 'import platform; print platform.linux_distribution()[0].lower()'\"`\n+chacra_endpoint=\"ceph/${chacra_ref}/${distro}/{$dist}/${ARCH}\"\n+\n+binary_exists=`chacractl binary exists ${chacra_endpoint}`\n+\n+# if the binary already exists in chacra, do not rebuild\n+if [ \"$binary_exists\" = true ] ; then\n+    echo \"The binary at ${chacra_endpoint} already exists, Exiting...\"","path":"ceph-build-next/build/build_deb","position":13,"original_position":13,"commit_id":"3307245c2ccf0753adbb473de8b21959867df4a8","original_commit_id":"3307245c2ccf0753adbb473de8b21959867df4a8","user":{"login":"alfredodeza","id":317847,"avatar_url":"https://avatars.githubusercontent.com/u/317847?v=3","gravatar_id":"","url":"https://api.github.com/users/alfredodeza","html_url":"https://github.com/alfredodeza","followers_url":"https://api.github.com/users/alfredodeza/followers","following_url":"https://api.github.com/users/alfredodeza/following{/other_user}","gists_url":"https://api.github.com/users/alfredodeza/gists{/gist_id}","starred_url":"https://api.github.com/users/alfredodeza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alfredodeza/subscriptions","organizations_url":"https://api.github.com/users/alfredodeza/orgs","repos_url":"https://api.github.com/users/alfredodeza/repos","events_url":"https://api.github.com/users/alfredodeza/events{/privacy}","received_events_url":"https://api.github.com/users/alfredodeza/received_events","type":"User","site_admin":false},"body":"Like I mentioned in the comment above, we are not really checking for binaries, just endpoints to the url where the binaries would live. It is meant to work that way because a job like Ceph produces a lot of binaries, not just one. So this `echo` should really be: \r\n\r\n    echo \"The endpoint at ${chacra_endpoint} already exists and FORCE_REBUILD was not used, Exiting...\"","created_at":"2015-10-27T16:27:12Z","updated_at":"2015-10-27T16:27:12Z","html_url":"https://github.com/ceph/ceph-build/pull/161#discussion_r43146673","pull_request_url":"https://api.github.com/repos/ceph/ceph-build/pulls/161","_links":{"self":{"href":"https://api.github.com/repos/ceph/ceph-build/pulls/comments/43146673"},"html":{"href":"https://github.com/ceph/ceph-build/pull/161#discussion_r43146673"},"pull_request":{"href":"https://api.github.com/repos/ceph/ceph-build/pulls/161"}}},"pull_request":{"url":"https://api.github.com/repos/ceph/ceph-build/pulls/161","id":48893777,"html_url":"https://github.com/ceph/ceph-build/pull/161","diff_url":"https://github.com/ceph/ceph-build/pull/161.diff","patch_url":"https://github.com/ceph/ceph-build/pull/161.patch","issue_url":"https://api.github.com/repos/ceph/ceph-build/issues/161","number":161,"state":"closed","locked":false,"title":"check chacra to see if a binary exists before rebuilding it","user":{"login":"andrewschoen","id":20618,"avatar_url":"https://avatars.githubusercontent.com/u/20618?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewschoen","html_url":"https://github.com/andrewschoen","followers_url":"https://api.github.com/users/andrewschoen/followers","following_url":"https://api.github.com/users/andrewschoen/following{/other_user}","gists_url":"https://api.github.com/users/andrewschoen/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewschoen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewschoen/subscriptions","organizations_url":"https://api.github.com/users/andrewschoen/orgs","repos_url":"https://api.github.com/users/andrewschoen/repos","events_url":"https://api.github.com/users/andrewschoen/events{/privacy}","received_events_url":"https://api.github.com/users/andrewschoen/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-27T16:15:04Z","updated_at":"2015-10-27T16:27:12Z","closed_at":"2015-10-27T16:21:05Z","merged_at":"2015-10-27T16:21:05Z","merge_commit_sha":"de6c04e14c55f22ca38accf1238975296f88bf03","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ceph/ceph-build/pulls/161/commits","review_comments_url":"https://api.github.com/repos/ceph/ceph-build/pulls/161/comments","review_comment_url":"https://api.github.com/repos/ceph/ceph-build/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ceph/ceph-build/issues/161/comments","statuses_url":"https://api.github.com/repos/ceph/ceph-build/statuses/3307245c2ccf0753adbb473de8b21959867df4a8","head":{"label":"ceph:chacractl-exists","ref":"chacractl-exists","sha":"3307245c2ccf0753adbb473de8b21959867df4a8","user":{"login":"ceph","id":1015767,"avatar_url":"https://avatars.githubusercontent.com/u/1015767?v=3","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"repo":{"id":2382336,"name":"ceph-build","full_name":"ceph/ceph-build","owner":{"login":"ceph","id":1015767,"avatar_url":"https://avatars.githubusercontent.com/u/1015767?v=3","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ceph/ceph-build","description":"Helper scripts for building the official Ceph packages","fork":false,"url":"https://api.github.com/repos/ceph/ceph-build","forks_url":"https://api.github.com/repos/ceph/ceph-build/forks","keys_url":"https://api.github.com/repos/ceph/ceph-build/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ceph/ceph-build/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ceph/ceph-build/teams","hooks_url":"https://api.github.com/repos/ceph/ceph-build/hooks","issue_events_url":"https://api.github.com/repos/ceph/ceph-build/issues/events{/number}","events_url":"https://api.github.com/repos/ceph/ceph-build/events","assignees_url":"https://api.github.com/repos/ceph/ceph-build/assignees{/user}","branches_url":"https://api.github.com/repos/ceph/ceph-build/branches{/branch}","tags_url":"https://api.github.com/repos/ceph/ceph-build/tags","blobs_url":"https://api.github.com/repos/ceph/ceph-build/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ceph/ceph-build/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ceph/ceph-build/git/refs{/sha}","trees_url":"https://api.github.com/repos/ceph/ceph-build/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ceph/ceph-build/statuses/{sha}","languages_url":"https://api.github.com/repos/ceph/ceph-build/languages","stargazers_url":"https://api.github.com/repos/ceph/ceph-build/stargazers","contributors_url":"https://api.github.com/repos/ceph/ceph-build/contributors","subscribers_url":"https://api.github.com/repos/ceph/ceph-build/subscribers","subscription_url":"https://api.github.com/repos/ceph/ceph-build/subscription","commits_url":"https://api.github.com/repos/ceph/ceph-build/commits{/sha}","git_commits_url":"https://api.github.com/repos/ceph/ceph-build/git/commits{/sha}","comments_url":"https://api.github.com/repos/ceph/ceph-build/comments{/number}","issue_comment_url":"https://api.github.com/repos/ceph/ceph-build/issues/comments{/number}","contents_url":"https://api.github.com/repos/ceph/ceph-build/contents/{+path}","compare_url":"https://api.github.com/repos/ceph/ceph-build/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ceph/ceph-build/merges","archive_url":"https://api.github.com/repos/ceph/ceph-build/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ceph/ceph-build/downloads","issues_url":"https://api.github.com/repos/ceph/ceph-build/issues{/number}","pulls_url":"https://api.github.com/repos/ceph/ceph-build/pulls{/number}","milestones_url":"https://api.github.com/repos/ceph/ceph-build/milestones{/number}","notifications_url":"https://api.github.com/repos/ceph/ceph-build/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ceph/ceph-build/labels{/name}","releases_url":"https://api.github.com/repos/ceph/ceph-build/releases{/id}","created_at":"2011-09-14T00:30:11Z","updated_at":"2015-07-03T08:40:06Z","pushed_at":"2015-10-27T16:21:07Z","git_url":"git://github.com/ceph/ceph-build.git","ssh_url":"git@github.com:ceph/ceph-build.git","clone_url":"https://github.com/ceph/ceph-build.git","svn_url":"https://github.com/ceph/ceph-build","homepage":"","size":1810,"stargazers_count":12,"watchers_count":12,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":2,"forks":11,"open_issues":2,"watchers":12,"default_branch":"master"}},"base":{"label":"ceph:master","ref":"master","sha":"99da5132b22313d81094812345e6246c9657332c","user":{"login":"ceph","id":1015767,"avatar_url":"https://avatars.githubusercontent.com/u/1015767?v=3","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"repo":{"id":2382336,"name":"ceph-build","full_name":"ceph/ceph-build","owner":{"login":"ceph","id":1015767,"avatar_url":"https://avatars.githubusercontent.com/u/1015767?v=3","gravatar_id":"","url":"https://api.github.com/users/ceph","html_url":"https://github.com/ceph","followers_url":"https://api.github.com/users/ceph/followers","following_url":"https://api.github.com/users/ceph/following{/other_user}","gists_url":"https://api.github.com/users/ceph/gists{/gist_id}","starred_url":"https://api.github.com/users/ceph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ceph/subscriptions","organizations_url":"https://api.github.com/users/ceph/orgs","repos_url":"https://api.github.com/users/ceph/repos","events_url":"https://api.github.com/users/ceph/events{/privacy}","received_events_url":"https://api.github.com/users/ceph/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ceph/ceph-build","description":"Helper scripts for building the official Ceph packages","fork":false,"url":"https://api.github.com/repos/ceph/ceph-build","forks_url":"https://api.github.com/repos/ceph/ceph-build/forks","keys_url":"https://api.github.com/repos/ceph/ceph-build/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ceph/ceph-build/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ceph/ceph-build/teams","hooks_url":"https://api.github.com/repos/ceph/ceph-build/hooks","issue_events_url":"https://api.github.com/repos/ceph/ceph-build/issues/events{/number}","events_url":"https://api.github.com/repos/ceph/ceph-build/events","assignees_url":"https://api.github.com/repos/ceph/ceph-build/assignees{/user}","branches_url":"https://api.github.com/repos/ceph/ceph-build/branches{/branch}","tags_url":"https://api.github.com/repos/ceph/ceph-build/tags","blobs_url":"https://api.github.com/repos/ceph/ceph-build/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ceph/ceph-build/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ceph/ceph-build/git/refs{/sha}","trees_url":"https://api.github.com/repos/ceph/ceph-build/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ceph/ceph-build/statuses/{sha}","languages_url":"https://api.github.com/repos/ceph/ceph-build/languages","stargazers_url":"https://api.github.com/repos/ceph/ceph-build/stargazers","contributors_url":"https://api.github.com/repos/ceph/ceph-build/contributors","subscribers_url":"https://api.github.com/repos/ceph/ceph-build/subscribers","subscription_url":"https://api.github.com/repos/ceph/ceph-build/subscription","commits_url":"https://api.github.com/repos/ceph/ceph-build/commits{/sha}","git_commits_url":"https://api.github.com/repos/ceph/ceph-build/git/commits{/sha}","comments_url":"https://api.github.com/repos/ceph/ceph-build/comments{/number}","issue_comment_url":"https://api.github.com/repos/ceph/ceph-build/issues/comments{/number}","contents_url":"https://api.github.com/repos/ceph/ceph-build/contents/{+path}","compare_url":"https://api.github.com/repos/ceph/ceph-build/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ceph/ceph-build/merges","archive_url":"https://api.github.com/repos/ceph/ceph-build/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ceph/ceph-build/downloads","issues_url":"https://api.github.com/repos/ceph/ceph-build/issues{/number}","pulls_url":"https://api.github.com/repos/ceph/ceph-build/pulls{/number}","milestones_url":"https://api.github.com/repos/ceph/ceph-build/milestones{/number}","notifications_url":"https://api.github.com/repos/ceph/ceph-build/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ceph/ceph-build/labels{/name}","releases_url":"https://api.github.com/repos/ceph/ceph-build/releases{/id}","created_at":"2011-09-14T00:30:11Z","updated_at":"2015-07-03T08:40:06Z","pushed_at":"2015-10-27T16:21:07Z","git_url":"git://github.com/ceph/ceph-build.git","ssh_url":"git@github.com:ceph/ceph-build.git","clone_url":"https://github.com/ceph/ceph-build.git","svn_url":"https://github.com/ceph/ceph-build","homepage":"","size":1810,"stargazers_count":12,"watchers_count":12,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":2,"forks":11,"open_issues":2,"watchers":12,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ceph/ceph-build/pulls/161"},"html":{"href":"https://github.com/ceph/ceph-build/pull/161"},"issue":{"href":"https://api.github.com/repos/ceph/ceph-build/issues/161"},"comments":{"href":"https://api.github.com/repos/ceph/ceph-build/issues/161/comments"},"review_comments":{"href":"https://api.github.com/repos/ceph/ceph-build/pulls/161/comments"},"review_comment":{"href":"https://api.github.com/repos/ceph/ceph-build/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ceph/ceph-build/pulls/161/commits"},"statuses":{"href":"https://api.github.com/repos/ceph/ceph-build/statuses/3307245c2ccf0753adbb473de8b21959867df4a8"}}}}