{"action":"created","comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/pulls/comments/78786761","id":78786761,"diff_hunk":"@@ -0,0 +1,80 @@\n+require 'logger'\n+require 'pathname'\n+require 'trollop'\n+require 'json'\n+\n+require_relative 'config'\n+\n+\n+def find_imgfac_image(image)\n+  f = File.new(image)\n+  Dir.chdir(STORAGE_DIR) do\n+    Dir.glob('*.body') do |filename|\n+      return filename.split('.').first if File.new(filename).stat.ino == f.stat.ino\n+    end\n+  end\n+end\n+\n+\n+def upload_imgfac_image(uuid, target, reference, version)\n+  if target == 'vagrant'\n+    creds_file = CREDS_DIR.join('atlas.json')\n+    params = \"atlas @ignored #{creds_file} --id #{uuid}\"\n+    params += \" --parameter atlas_box_name #{reference} --parameter atlas_box_version #{version}\"\n+  elsif target == 'gce'\n+    creds_file = CREDS_DIR.join('gce.json')\n+    params = \"gce @manageiq #{creds_file} --id #{uuid}\"\n+    params += \" --parameter gce_object_name manageiq-#{reference}-#{version}.tar.gz\"\n+    params += \" --parameter gce_image_name manageiq-#{reference}-#{version} --parameter gce_image_family centos-7\"","path":"scripts/vmpublish.rb","position":28,"original_position":28,"commit_id":"19ff7a8fcbf18f92f754e201bd2abdba7ee98734","original_commit_id":"19ff7a8fcbf18f92f754e201bd2abdba7ee98734","user":{"login":"jrafanie","id":19339,"avatar_url":"https://avatars.githubusercontent.com/u/19339?v=3","gravatar_id":"","url":"https://api.github.com/users/jrafanie","html_url":"https://github.com/jrafanie","followers_url":"https://api.github.com/users/jrafanie/followers","following_url":"https://api.github.com/users/jrafanie/following{/other_user}","gists_url":"https://api.github.com/users/jrafanie/gists{/gist_id}","starred_url":"https://api.github.com/users/jrafanie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrafanie/subscriptions","organizations_url":"https://api.github.com/users/jrafanie/orgs","repos_url":"https://api.github.com/users/jrafanie/repos","events_url":"https://api.github.com/users/jrafanie/events{/privacy}","received_events_url":"https://api.github.com/users/jrafanie/received_events","type":"User","site_admin":false},"body":"Note, I don't think we use AwesomeSpawn yet in this repo so maybe we shouldn't.  cc @carbonin @simaishi thoughts?","created_at":"2016-09-14T16:41:54Z","updated_at":"2016-09-14T16:41:54Z","html_url":"https://github.com/ManageIQ/manageiq-appliance-build/pull/154#discussion_r78786761","pull_request_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/pulls/154","_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/pulls/comments/78786761"},"html":{"href":"https://github.com/ManageIQ/manageiq-appliance-build/pull/154#discussion_r78786761"},"pull_request":{"href":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/pulls/154"}}},"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/pulls/154","id":84412121,"html_url":"https://github.com/ManageIQ/manageiq-appliance-build/pull/154","diff_url":"https://github.com/ManageIQ/manageiq-appliance-build/pull/154.diff","patch_url":"https://github.com/ManageIQ/manageiq-appliance-build/pull/154.patch","issue_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/issues/154","number":154,"state":"open","locked":false,"title":"vmpublish.rb: publish public images","user":{"login":"geertj","id":796683,"avatar_url":"https://avatars.githubusercontent.com/u/796683?v=3","gravatar_id":"","url":"https://api.github.com/users/geertj","html_url":"https://github.com/geertj","followers_url":"https://api.github.com/users/geertj/followers","following_url":"https://api.github.com/users/geertj/following{/other_user}","gists_url":"https://api.github.com/users/geertj/gists{/gist_id}","starred_url":"https://api.github.com/users/geertj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geertj/subscriptions","organizations_url":"https://api.github.com/users/geertj/orgs","repos_url":"https://api.github.com/users/geertj/repos","events_url":"https://api.github.com/users/geertj/events{/privacy}","received_events_url":"https://api.github.com/users/geertj/received_events","type":"User","site_admin":false},"body":"This script publishes builds from a previous vmbuild.rb invocation to\r\nany of the configurated public directories. Currently this means Atlas\r\n(for Vagrant images) and GCE (for GCE images).\r\n\r\nThis code could probably use a similar metadata driven approach as\r\nvmbuild.rb. However for now I believe the current approach of hardcoding\r\nsome of the calling conventions and parameters for each of the supported\r\ntargets works.","created_at":"2016-09-08T04:13:18Z","updated_at":"2016-09-14T16:41:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9fcfd6b804e0a3fc5c2d20fa633654ccfb32aa35","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/pulls/154/commits","review_comments_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/pulls/154/comments","review_comment_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/issues/154/comments","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/statuses/19ff7a8fcbf18f92f754e201bd2abdba7ee98734","head":{"label":"geertj:dev/upload","ref":"dev/upload","sha":"19ff7a8fcbf18f92f754e201bd2abdba7ee98734","user":{"login":"geertj","id":796683,"avatar_url":"https://avatars.githubusercontent.com/u/796683?v=3","gravatar_id":"","url":"https://api.github.com/users/geertj","html_url":"https://github.com/geertj","followers_url":"https://api.github.com/users/geertj/followers","following_url":"https://api.github.com/users/geertj/following{/other_user}","gists_url":"https://api.github.com/users/geertj/gists{/gist_id}","starred_url":"https://api.github.com/users/geertj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geertj/subscriptions","organizations_url":"https://api.github.com/users/geertj/orgs","repos_url":"https://api.github.com/users/geertj/repos","events_url":"https://api.github.com/users/geertj/events{/privacy}","received_events_url":"https://api.github.com/users/geertj/received_events","type":"User","site_admin":false},"repo":{"id":65106638,"name":"manageiq-appliance-build","full_name":"geertj/manageiq-appliance-build","owner":{"login":"geertj","id":796683,"avatar_url":"https://avatars.githubusercontent.com/u/796683?v=3","gravatar_id":"","url":"https://api.github.com/users/geertj","html_url":"https://github.com/geertj","followers_url":"https://api.github.com/users/geertj/followers","following_url":"https://api.github.com/users/geertj/following{/other_user}","gists_url":"https://api.github.com/users/geertj/gists{/gist_id}","starred_url":"https://api.github.com/users/geertj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geertj/subscriptions","organizations_url":"https://api.github.com/users/geertj/orgs","repos_url":"https://api.github.com/users/geertj/repos","events_url":"https://api.github.com/users/geertj/events{/privacy}","received_events_url":"https://api.github.com/users/geertj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/geertj/manageiq-appliance-build","description":"Scripts to build ManageIQ appliances","fork":true,"url":"https://api.github.com/repos/geertj/manageiq-appliance-build","forks_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/forks","keys_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/teams","hooks_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/hooks","issue_events_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/issues/events{/number}","events_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/events","assignees_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/assignees{/user}","branches_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/branches{/branch}","tags_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/tags","blobs_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/git/refs{/sha}","trees_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/statuses/{sha}","languages_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/languages","stargazers_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/stargazers","contributors_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/contributors","subscribers_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/subscribers","subscription_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/subscription","commits_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/commits{/sha}","git_commits_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/git/commits{/sha}","comments_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/comments{/number}","issue_comment_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/issues/comments{/number}","contents_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/contents/{+path}","compare_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/merges","archive_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/downloads","issues_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/issues{/number}","pulls_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/pulls{/number}","milestones_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/milestones{/number}","notifications_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/labels{/name}","releases_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/releases{/id}","deployments_url":"https://api.github.com/repos/geertj/manageiq-appliance-build/deployments","created_at":"2016-08-06T23:39:48Z","updated_at":"2016-08-06T23:39:49Z","pushed_at":"2016-09-13T22:06:55Z","git_url":"git://github.com/geertj/manageiq-appliance-build.git","ssh_url":"git@github.com:geertj/manageiq-appliance-build.git","clone_url":"https://github.com/geertj/manageiq-appliance-build.git","svn_url":"https://github.com/geertj/manageiq-appliance-build","homepage":null,"size":309,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"ManageIQ:master","ref":"master","sha":"5eac9c7c1910b81c57f036aae1d8c5063505ea99","user":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars.githubusercontent.com/u/1125575?v=3","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"repo":{"id":38112825,"name":"manageiq-appliance-build","full_name":"ManageIQ/manageiq-appliance-build","owner":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars.githubusercontent.com/u/1125575?v=3","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ManageIQ/manageiq-appliance-build","description":"Scripts to build ManageIQ appliances","fork":false,"url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build","forks_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/forks","keys_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/teams","hooks_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/hooks","issue_events_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/issues/events{/number}","events_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/events","assignees_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/assignees{/user}","branches_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/branches{/branch}","tags_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/tags","blobs_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/git/refs{/sha}","trees_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/statuses/{sha}","languages_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/languages","stargazers_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/stargazers","contributors_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/contributors","subscribers_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/subscribers","subscription_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/subscription","commits_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/commits{/sha}","git_commits_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/git/commits{/sha}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/comments{/number}","issue_comment_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/issues/comments{/number}","contents_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/contents/{+path}","compare_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/merges","archive_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/downloads","issues_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/issues{/number}","pulls_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/pulls{/number}","milestones_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/milestones{/number}","notifications_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/labels{/name}","releases_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/releases{/id}","deployments_url":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/deployments","created_at":"2015-06-26T13:32:44Z","updated_at":"2016-08-23T19:21:05Z","pushed_at":"2016-09-14T15:52:45Z","git_url":"git://github.com/ManageIQ/manageiq-appliance-build.git","ssh_url":"git@github.com:ManageIQ/manageiq-appliance-build.git","clone_url":"https://github.com/ManageIQ/manageiq-appliance-build.git","svn_url":"https://github.com/ManageIQ/manageiq-appliance-build","homepage":null,"size":329,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":20,"forks":17,"open_issues":20,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/pulls/154"},"html":{"href":"https://github.com/ManageIQ/manageiq-appliance-build/pull/154"},"issue":{"href":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/issues/154"},"comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/issues/154/comments"},"review_comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/pulls/154/comments"},"review_comment":{"href":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/pulls/154/commits"},"statuses":{"href":"https://api.github.com/repos/ManageIQ/manageiq-appliance-build/statuses/19ff7a8fcbf18f92f754e201bd2abdba7ee98734"}}}}
{"actor":{"display_login":"jrafanie"}}