{"action":"created","comment":{"url":"https://api.github.com/repos/concourse/docker-image-resource/pulls/comments/37220621","id":37220621,"diff_hunk":"@@ -37,22 +37,40 @@ fi\n repository=\"$(jq -r '.source.repository // \"\"' < $payload)\"\n tag=\"$(jq -r '.source.tag // \"latest\"' < $payload)\"\n rootfs=\"$(jq -r '.params.rootfs // false' < $payload)\"\n-\n-docker_pull \"${repository}:${tag}\"\n-\n-image=$(docker_image \"$repository\" \"$tag\")\n-if [ -z \"$image\" ]; then\n-  echo \"failed to determine image id :(\"\n-  exit 1\n-fi\n+skip_download=\"$(jq -r '.params.skip_download // false' < $payload)\"\n \n mkdir -p $destination\n \n-docker save -o ${destination}/image \"$image\"\n-\n-if [ \"$rootfs\" = \"true\" ]; then\n-  docker run --cidfile=container.cid \"$image\" echo container created\n-  docker export $(cat container.cid) > ${destination}/rootfs.tar\n+if ! $skip_download","path":"assets/in","position":21,"original_position":21,"commit_id":"f4287f3a4f7a4e3f301e9e6ad9ad751fab281924","original_commit_id":"f4287f3a4f7a4e3f301e9e6ad9ad751fab281924","user":{"login":"xoebus","id":38814,"avatar_url":"https://avatars.githubusercontent.com/u/38814?v=3","gravatar_id":"","url":"https://api.github.com/users/xoebus","html_url":"https://github.com/xoebus","followers_url":"https://api.github.com/users/xoebus/followers","following_url":"https://api.github.com/users/xoebus/following{/other_user}","gists_url":"https://api.github.com/users/xoebus/gists{/gist_id}","starred_url":"https://api.github.com/users/xoebus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xoebus/subscriptions","organizations_url":"https://api.github.com/users/xoebus/orgs","repos_url":"https://api.github.com/users/xoebus/repos","events_url":"https://api.github.com/users/xoebus/events{/privacy}","received_events_url":"https://api.github.com/users/xoebus/received_events","type":"User","site_admin":false},"body":"This should be of the form:\r\n\r\n```\r\nif [ \"$skip_download\" = \"true\" ]; then\r\n```\r\n\r\nto avoid subtle `bash` behavior.","created_at":"2015-08-17T18:33:53Z","updated_at":"2015-08-17T18:33:53Z","html_url":"https://github.com/concourse/docker-image-resource/pull/11#discussion_r37220621","pull_request_url":"https://api.github.com/repos/concourse/docker-image-resource/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/concourse/docker-image-resource/pulls/comments/37220621"},"html":{"href":"https://github.com/concourse/docker-image-resource/pull/11#discussion_r37220621"},"pull_request":{"href":"https://api.github.com/repos/concourse/docker-image-resource/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/concourse/docker-image-resource/pulls/11","id":42403479,"html_url":"https://github.com/concourse/docker-image-resource/pull/11","diff_url":"https://github.com/concourse/docker-image-resource/pull/11.diff","patch_url":"https://github.com/concourse/docker-image-resource/pull/11.patch","issue_url":"https://api.github.com/repos/concourse/docker-image-resource/issues/11","number":11,"state":"open","locked":false,"title":"Allow skipping docker pull during `get` step [#100994844]","user":{"login":"monkeyherder","id":723533,"avatar_url":"https://avatars.githubusercontent.com/u/723533?v=3","gravatar_id":"","url":"https://api.github.com/users/monkeyherder","html_url":"https://github.com/monkeyherder","followers_url":"https://api.github.com/users/monkeyherder/followers","following_url":"https://api.github.com/users/monkeyherder/following{/other_user}","gists_url":"https://api.github.com/users/monkeyherder/gists{/gist_id}","starred_url":"https://api.github.com/users/monkeyherder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monkeyherder/subscriptions","organizations_url":"https://api.github.com/users/monkeyherder/orgs","repos_url":"https://api.github.com/users/monkeyherder/repos","events_url":"https://api.github.com/users/monkeyherder/events{/privacy}","received_events_url":"https://api.github.com/users/monkeyherder/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-13T21:49:51Z","updated_at":"2015-08-17T18:33:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"51873700df52463afbec6b381c89f68ee1f9127b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/concourse/docker-image-resource/pulls/11/commits","review_comments_url":"https://api.github.com/repos/concourse/docker-image-resource/pulls/11/comments","review_comment_url":"https://api.github.com/repos/concourse/docker-image-resource/pulls/comments{/number}","comments_url":"https://api.github.com/repos/concourse/docker-image-resource/issues/11/comments","statuses_url":"https://api.github.com/repos/concourse/docker-image-resource/statuses/f4287f3a4f7a4e3f301e9e6ad9ad751fab281924","head":{"label":"monkeyherder:master","ref":"master","sha":"f4287f3a4f7a4e3f301e9e6ad9ad751fab281924","user":{"login":"monkeyherder","id":723533,"avatar_url":"https://avatars.githubusercontent.com/u/723533?v=3","gravatar_id":"","url":"https://api.github.com/users/monkeyherder","html_url":"https://github.com/monkeyherder","followers_url":"https://api.github.com/users/monkeyherder/followers","following_url":"https://api.github.com/users/monkeyherder/following{/other_user}","gists_url":"https://api.github.com/users/monkeyherder/gists{/gist_id}","starred_url":"https://api.github.com/users/monkeyherder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monkeyherder/subscriptions","organizations_url":"https://api.github.com/users/monkeyherder/orgs","repos_url":"https://api.github.com/users/monkeyherder/repos","events_url":"https://api.github.com/users/monkeyherder/events{/privacy}","received_events_url":"https://api.github.com/users/monkeyherder/received_events","type":"User","site_admin":false},"repo":{"id":40505689,"name":"docker-image-resource","full_name":"monkeyherder/docker-image-resource","owner":{"login":"monkeyherder","id":723533,"avatar_url":"https://avatars.githubusercontent.com/u/723533?v=3","gravatar_id":"","url":"https://api.github.com/users/monkeyherder","html_url":"https://github.com/monkeyherder","followers_url":"https://api.github.com/users/monkeyherder/followers","following_url":"https://api.github.com/users/monkeyherder/following{/other_user}","gists_url":"https://api.github.com/users/monkeyherder/gists{/gist_id}","starred_url":"https://api.github.com/users/monkeyherder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/monkeyherder/subscriptions","organizations_url":"https://api.github.com/users/monkeyherder/orgs","repos_url":"https://api.github.com/users/monkeyherder/repos","events_url":"https://api.github.com/users/monkeyherder/events{/privacy}","received_events_url":"https://api.github.com/users/monkeyherder/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/monkeyherder/docker-image-resource","description":"a resource for docker images","fork":true,"url":"https://api.github.com/repos/monkeyherder/docker-image-resource","forks_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/forks","keys_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/keys{/key_id}","collaborators_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/teams","hooks_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/hooks","issue_events_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/issues/events{/number}","events_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/events","assignees_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/assignees{/user}","branches_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/branches{/branch}","tags_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/tags","blobs_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/git/refs{/sha}","trees_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/git/trees{/sha}","statuses_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/statuses/{sha}","languages_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/languages","stargazers_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/stargazers","contributors_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/contributors","subscribers_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/subscribers","subscription_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/subscription","commits_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/commits{/sha}","git_commits_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/git/commits{/sha}","comments_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/comments{/number}","issue_comment_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/issues/comments{/number}","contents_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/contents/{+path}","compare_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/compare/{base}...{head}","merges_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/merges","archive_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/downloads","issues_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/issues{/number}","pulls_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/pulls{/number}","milestones_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/milestones{/number}","notifications_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/labels{/name}","releases_url":"https://api.github.com/repos/monkeyherder/docker-image-resource/releases{/id}","created_at":"2015-08-10T20:54:14Z","updated_at":"2015-08-10T20:54:15Z","pushed_at":"2015-08-13T21:48:44Z","git_url":"git://github.com/monkeyherder/docker-image-resource.git","ssh_url":"git@github.com:monkeyherder/docker-image-resource.git","clone_url":"https://github.com/monkeyherder/docker-image-resource.git","svn_url":"https://github.com/monkeyherder/docker-image-resource","homepage":"","size":126,"stargazers_count":0,"watchers_count":0,"language":"Shell","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":"concourse:master","ref":"master","sha":"67b2e8a68271eeaadefb191b1c3d860ea174f841","user":{"login":"concourse","id":7809479,"avatar_url":"https://avatars.githubusercontent.com/u/7809479?v=3","gravatar_id":"","url":"https://api.github.com/users/concourse","html_url":"https://github.com/concourse","followers_url":"https://api.github.com/users/concourse/followers","following_url":"https://api.github.com/users/concourse/following{/other_user}","gists_url":"https://api.github.com/users/concourse/gists{/gist_id}","starred_url":"https://api.github.com/users/concourse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/concourse/subscriptions","organizations_url":"https://api.github.com/users/concourse/orgs","repos_url":"https://api.github.com/users/concourse/repos","events_url":"https://api.github.com/users/concourse/events{/privacy}","received_events_url":"https://api.github.com/users/concourse/received_events","type":"Organization","site_admin":false},"repo":{"id":24299186,"name":"docker-image-resource","full_name":"concourse/docker-image-resource","owner":{"login":"concourse","id":7809479,"avatar_url":"https://avatars.githubusercontent.com/u/7809479?v=3","gravatar_id":"","url":"https://api.github.com/users/concourse","html_url":"https://github.com/concourse","followers_url":"https://api.github.com/users/concourse/followers","following_url":"https://api.github.com/users/concourse/following{/other_user}","gists_url":"https://api.github.com/users/concourse/gists{/gist_id}","starred_url":"https://api.github.com/users/concourse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/concourse/subscriptions","organizations_url":"https://api.github.com/users/concourse/orgs","repos_url":"https://api.github.com/users/concourse/repos","events_url":"https://api.github.com/users/concourse/events{/privacy}","received_events_url":"https://api.github.com/users/concourse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/concourse/docker-image-resource","description":"a resource for docker images","fork":false,"url":"https://api.github.com/repos/concourse/docker-image-resource","forks_url":"https://api.github.com/repos/concourse/docker-image-resource/forks","keys_url":"https://api.github.com/repos/concourse/docker-image-resource/keys{/key_id}","collaborators_url":"https://api.github.com/repos/concourse/docker-image-resource/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/concourse/docker-image-resource/teams","hooks_url":"https://api.github.com/repos/concourse/docker-image-resource/hooks","issue_events_url":"https://api.github.com/repos/concourse/docker-image-resource/issues/events{/number}","events_url":"https://api.github.com/repos/concourse/docker-image-resource/events","assignees_url":"https://api.github.com/repos/concourse/docker-image-resource/assignees{/user}","branches_url":"https://api.github.com/repos/concourse/docker-image-resource/branches{/branch}","tags_url":"https://api.github.com/repos/concourse/docker-image-resource/tags","blobs_url":"https://api.github.com/repos/concourse/docker-image-resource/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/concourse/docker-image-resource/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/concourse/docker-image-resource/git/refs{/sha}","trees_url":"https://api.github.com/repos/concourse/docker-image-resource/git/trees{/sha}","statuses_url":"https://api.github.com/repos/concourse/docker-image-resource/statuses/{sha}","languages_url":"https://api.github.com/repos/concourse/docker-image-resource/languages","stargazers_url":"https://api.github.com/repos/concourse/docker-image-resource/stargazers","contributors_url":"https://api.github.com/repos/concourse/docker-image-resource/contributors","subscribers_url":"https://api.github.com/repos/concourse/docker-image-resource/subscribers","subscription_url":"https://api.github.com/repos/concourse/docker-image-resource/subscription","commits_url":"https://api.github.com/repos/concourse/docker-image-resource/commits{/sha}","git_commits_url":"https://api.github.com/repos/concourse/docker-image-resource/git/commits{/sha}","comments_url":"https://api.github.com/repos/concourse/docker-image-resource/comments{/number}","issue_comment_url":"https://api.github.com/repos/concourse/docker-image-resource/issues/comments{/number}","contents_url":"https://api.github.com/repos/concourse/docker-image-resource/contents/{+path}","compare_url":"https://api.github.com/repos/concourse/docker-image-resource/compare/{base}...{head}","merges_url":"https://api.github.com/repos/concourse/docker-image-resource/merges","archive_url":"https://api.github.com/repos/concourse/docker-image-resource/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/concourse/docker-image-resource/downloads","issues_url":"https://api.github.com/repos/concourse/docker-image-resource/issues{/number}","pulls_url":"https://api.github.com/repos/concourse/docker-image-resource/pulls{/number}","milestones_url":"https://api.github.com/repos/concourse/docker-image-resource/milestones{/number}","notifications_url":"https://api.github.com/repos/concourse/docker-image-resource/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/concourse/docker-image-resource/labels{/name}","releases_url":"https://api.github.com/repos/concourse/docker-image-resource/releases{/id}","created_at":"2014-09-21T18:17:17Z","updated_at":"2015-06-29T09:04:34Z","pushed_at":"2015-08-13T21:49:52Z","git_url":"git://github.com/concourse/docker-image-resource.git","ssh_url":"git@github.com:concourse/docker-image-resource.git","clone_url":"https://github.com/concourse/docker-image-resource.git","svn_url":"https://github.com/concourse/docker-image-resource","homepage":"","size":278,"stargazers_count":4,"watchers_count":4,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":2,"forks":9,"open_issues":2,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/concourse/docker-image-resource/pulls/11"},"html":{"href":"https://github.com/concourse/docker-image-resource/pull/11"},"issue":{"href":"https://api.github.com/repos/concourse/docker-image-resource/issues/11"},"comments":{"href":"https://api.github.com/repos/concourse/docker-image-resource/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/concourse/docker-image-resource/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/concourse/docker-image-resource/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/concourse/docker-image-resource/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/concourse/docker-image-resource/statuses/f4287f3a4f7a4e3f301e9e6ad9ad751fab281924"}}}}