{"action":"created","comment":{"url":"https://api.github.com/repos/Azure/packer-azure/pulls/comments/58787176","id":58787176,"diff_hunk":"@@ -151,7 +154,24 @@ func (b *Builder) Run(ui packer.Ui, hook packer.Hook, cache packer.Cache) (packe\n \t\treturn nil, errors.New(\"Build was halted.\")\n \t}\n \n-\treturn &artifact{}, nil\n+\tif template, ok := b.stateBag.GetOk(constants.ArmCaptureTemplate); ok {\n+\t\treturn NewArtifact(\n+\t\t\ttemplate.(*CaptureTemplate),\n+\t\t\tfunc(name string) string {\n+\t\t\t\tmonth := oneMonthFromNowUtc()\n+\t\t\t\tsasUrl, _ := azureClient.BlobStorageClient.GetBlobSASURI(DefaultSasBlobContainer, name, month, DefaultSasBlobPermission)\n+\t\t\t\treturn sasUrl\n+\t\t\t})\n+\t}\n+\n+\treturn &Artifact{}, nil\n+}\n+\n+func oneMonthFromNowUtc() time.Time {\n+\toneMonth := time.Now().Add(time.Hour * 24 * 31)","path":"packer/builder/azure/arm/builder.go","position":36,"original_position":36,"commit_id":"60806af047cf452c570715ac6874a7e013bcd27d","original_commit_id":"60806af047cf452c570715ac6874a7e013bcd27d","user":{"login":"paulmey","id":1740197,"avatar_url":"https://avatars.githubusercontent.com/u/1740197?v=3","gravatar_id":"","url":"https://api.github.com/users/paulmey","html_url":"https://github.com/paulmey","followers_url":"https://api.github.com/users/paulmey/followers","following_url":"https://api.github.com/users/paulmey/following{/other_user}","gists_url":"https://api.github.com/users/paulmey/gists{/gist_id}","starred_url":"https://api.github.com/users/paulmey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulmey/subscriptions","organizations_url":"https://api.github.com/users/paulmey/orgs","repos_url":"https://api.github.com/users/paulmey/repos","events_url":"https://api.github.com/users/paulmey/events{/privacy}","received_events_url":"https://api.github.com/users/paulmey/received_events","type":"User","site_admin":false},"body":".AddDate(0,1,0)? or is this actually thirtyOneDaysFromNowUtc() ? :-)","created_at":"2016-04-06T21:41:23Z","updated_at":"2016-04-06T21:41:23Z","html_url":"https://github.com/Azure/packer-azure/pull/236#discussion_r58787176","pull_request_url":"https://api.github.com/repos/Azure/packer-azure/pulls/236","_links":{"self":{"href":"https://api.github.com/repos/Azure/packer-azure/pulls/comments/58787176"},"html":{"href":"https://github.com/Azure/packer-azure/pull/236#discussion_r58787176"},"pull_request":{"href":"https://api.github.com/repos/Azure/packer-azure/pulls/236"}}},"pull_request":{"url":"https://api.github.com/repos/Azure/packer-azure/pulls/236","id":65504981,"html_url":"https://github.com/Azure/packer-azure/pull/236","diff_url":"https://github.com/Azure/packer-azure/pull/236.diff","patch_url":"https://github.com/Azure/packer-azure/pull/236.patch","issue_url":"https://api.github.com/repos/Azure/packer-azure/issues/236","number":236,"state":"open","locked":false,"title":"Output a reasonable artifact.","user":{"login":"boumenot","id":91112,"avatar_url":"https://avatars.githubusercontent.com/u/91112?v=3","gravatar_id":"","url":"https://api.github.com/users/boumenot","html_url":"https://github.com/boumenot","followers_url":"https://api.github.com/users/boumenot/followers","following_url":"https://api.github.com/users/boumenot/following{/other_user}","gists_url":"https://api.github.com/users/boumenot/gists{/gist_id}","starred_url":"https://api.github.com/users/boumenot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boumenot/subscriptions","organizations_url":"https://api.github.com/users/boumenot/orgs","repos_url":"https://api.github.com/users/boumenot/repos","events_url":"https://api.github.com/users/boumenot/events{/privacy}","received_events_url":"https://api.github.com/users/boumenot/received_events","type":"User","site_admin":false},"body":"The artifact now includes the following data.\r\n\r\n * storage account name\r\n * storage account location\r\n * storage account blob name\r\n * storage account container name\r\n * URL of the packer VHD\r\n * read-only SAS URL of the packer VHD that's good for about 30 days\r\n * URL of a template to deploy the VHD\r\n * read-only SAS URL of a template to deploy the VHD that's good for about\r\n   30 days","created_at":"2016-04-06T17:28:20Z","updated_at":"2016-04-06T21:41:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fbe87c7c3fbfdf71e43f5beec6ffad8f0cf178f9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Azure/packer-azure/pulls/236/commits","review_comments_url":"https://api.github.com/repos/Azure/packer-azure/pulls/236/comments","review_comment_url":"https://api.github.com/repos/Azure/packer-azure/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Azure/packer-azure/issues/236/comments","statuses_url":"https://api.github.com/repos/Azure/packer-azure/statuses/60806af047cf452c570715ac6874a7e013bcd27d","head":{"label":"boumenot:pr-artifact","ref":"pr-artifact","sha":"60806af047cf452c570715ac6874a7e013bcd27d","user":{"login":"boumenot","id":91112,"avatar_url":"https://avatars.githubusercontent.com/u/91112?v=3","gravatar_id":"","url":"https://api.github.com/users/boumenot","html_url":"https://github.com/boumenot","followers_url":"https://api.github.com/users/boumenot/followers","following_url":"https://api.github.com/users/boumenot/following{/other_user}","gists_url":"https://api.github.com/users/boumenot/gists{/gist_id}","starred_url":"https://api.github.com/users/boumenot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boumenot/subscriptions","organizations_url":"https://api.github.com/users/boumenot/orgs","repos_url":"https://api.github.com/users/boumenot/repos","events_url":"https://api.github.com/users/boumenot/events{/privacy}","received_events_url":"https://api.github.com/users/boumenot/received_events","type":"User","site_admin":false},"repo":{"id":48000709,"name":"packer-azure","full_name":"boumenot/packer-azure","owner":{"login":"boumenot","id":91112,"avatar_url":"https://avatars.githubusercontent.com/u/91112?v=3","gravatar_id":"","url":"https://api.github.com/users/boumenot","html_url":"https://github.com/boumenot","followers_url":"https://api.github.com/users/boumenot/followers","following_url":"https://api.github.com/users/boumenot/following{/other_user}","gists_url":"https://api.github.com/users/boumenot/gists{/gist_id}","starred_url":"https://api.github.com/users/boumenot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boumenot/subscriptions","organizations_url":"https://api.github.com/users/boumenot/orgs","repos_url":"https://api.github.com/users/boumenot/repos","events_url":"https://api.github.com/users/boumenot/events{/privacy}","received_events_url":"https://api.github.com/users/boumenot/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/boumenot/packer-azure","description":"Packer for Azure","fork":true,"url":"https://api.github.com/repos/boumenot/packer-azure","forks_url":"https://api.github.com/repos/boumenot/packer-azure/forks","keys_url":"https://api.github.com/repos/boumenot/packer-azure/keys{/key_id}","collaborators_url":"https://api.github.com/repos/boumenot/packer-azure/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/boumenot/packer-azure/teams","hooks_url":"https://api.github.com/repos/boumenot/packer-azure/hooks","issue_events_url":"https://api.github.com/repos/boumenot/packer-azure/issues/events{/number}","events_url":"https://api.github.com/repos/boumenot/packer-azure/events","assignees_url":"https://api.github.com/repos/boumenot/packer-azure/assignees{/user}","branches_url":"https://api.github.com/repos/boumenot/packer-azure/branches{/branch}","tags_url":"https://api.github.com/repos/boumenot/packer-azure/tags","blobs_url":"https://api.github.com/repos/boumenot/packer-azure/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/boumenot/packer-azure/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/boumenot/packer-azure/git/refs{/sha}","trees_url":"https://api.github.com/repos/boumenot/packer-azure/git/trees{/sha}","statuses_url":"https://api.github.com/repos/boumenot/packer-azure/statuses/{sha}","languages_url":"https://api.github.com/repos/boumenot/packer-azure/languages","stargazers_url":"https://api.github.com/repos/boumenot/packer-azure/stargazers","contributors_url":"https://api.github.com/repos/boumenot/packer-azure/contributors","subscribers_url":"https://api.github.com/repos/boumenot/packer-azure/subscribers","subscription_url":"https://api.github.com/repos/boumenot/packer-azure/subscription","commits_url":"https://api.github.com/repos/boumenot/packer-azure/commits{/sha}","git_commits_url":"https://api.github.com/repos/boumenot/packer-azure/git/commits{/sha}","comments_url":"https://api.github.com/repos/boumenot/packer-azure/comments{/number}","issue_comment_url":"https://api.github.com/repos/boumenot/packer-azure/issues/comments{/number}","contents_url":"https://api.github.com/repos/boumenot/packer-azure/contents/{+path}","compare_url":"https://api.github.com/repos/boumenot/packer-azure/compare/{base}...{head}","merges_url":"https://api.github.com/repos/boumenot/packer-azure/merges","archive_url":"https://api.github.com/repos/boumenot/packer-azure/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/boumenot/packer-azure/downloads","issues_url":"https://api.github.com/repos/boumenot/packer-azure/issues{/number}","pulls_url":"https://api.github.com/repos/boumenot/packer-azure/pulls{/number}","milestones_url":"https://api.github.com/repos/boumenot/packer-azure/milestones{/number}","notifications_url":"https://api.github.com/repos/boumenot/packer-azure/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/boumenot/packer-azure/labels{/name}","releases_url":"https://api.github.com/repos/boumenot/packer-azure/releases{/id}","deployments_url":"https://api.github.com/repos/boumenot/packer-azure/deployments","created_at":"2015-12-14T20:55:22Z","updated_at":"2016-02-09T20:46:25Z","pushed_at":"2016-04-06T21:31:07Z","git_url":"git://github.com/boumenot/packer-azure.git","ssh_url":"git@github.com:boumenot/packer-azure.git","clone_url":"https://github.com/boumenot/packer-azure.git","svn_url":"https://github.com/boumenot/packer-azure","homepage":null,"size":71610,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"Azure:master","ref":"master","sha":"76ce011b1c41ff4a9b2161398d1873b61ab960f9","user":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"repo":{"id":21581639,"name":"packer-azure","full_name":"Azure/packer-azure","owner":{"login":"Azure","id":6844498,"avatar_url":"https://avatars.githubusercontent.com/u/6844498?v=3","gravatar_id":"","url":"https://api.github.com/users/Azure","html_url":"https://github.com/Azure","followers_url":"https://api.github.com/users/Azure/followers","following_url":"https://api.github.com/users/Azure/following{/other_user}","gists_url":"https://api.github.com/users/Azure/gists{/gist_id}","starred_url":"https://api.github.com/users/Azure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Azure/subscriptions","organizations_url":"https://api.github.com/users/Azure/orgs","repos_url":"https://api.github.com/users/Azure/repos","events_url":"https://api.github.com/users/Azure/events{/privacy}","received_events_url":"https://api.github.com/users/Azure/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Azure/packer-azure","description":"Packer for Azure","fork":false,"url":"https://api.github.com/repos/Azure/packer-azure","forks_url":"https://api.github.com/repos/Azure/packer-azure/forks","keys_url":"https://api.github.com/repos/Azure/packer-azure/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Azure/packer-azure/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Azure/packer-azure/teams","hooks_url":"https://api.github.com/repos/Azure/packer-azure/hooks","issue_events_url":"https://api.github.com/repos/Azure/packer-azure/issues/events{/number}","events_url":"https://api.github.com/repos/Azure/packer-azure/events","assignees_url":"https://api.github.com/repos/Azure/packer-azure/assignees{/user}","branches_url":"https://api.github.com/repos/Azure/packer-azure/branches{/branch}","tags_url":"https://api.github.com/repos/Azure/packer-azure/tags","blobs_url":"https://api.github.com/repos/Azure/packer-azure/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Azure/packer-azure/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Azure/packer-azure/git/refs{/sha}","trees_url":"https://api.github.com/repos/Azure/packer-azure/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Azure/packer-azure/statuses/{sha}","languages_url":"https://api.github.com/repos/Azure/packer-azure/languages","stargazers_url":"https://api.github.com/repos/Azure/packer-azure/stargazers","contributors_url":"https://api.github.com/repos/Azure/packer-azure/contributors","subscribers_url":"https://api.github.com/repos/Azure/packer-azure/subscribers","subscription_url":"https://api.github.com/repos/Azure/packer-azure/subscription","commits_url":"https://api.github.com/repos/Azure/packer-azure/commits{/sha}","git_commits_url":"https://api.github.com/repos/Azure/packer-azure/git/commits{/sha}","comments_url":"https://api.github.com/repos/Azure/packer-azure/comments{/number}","issue_comment_url":"https://api.github.com/repos/Azure/packer-azure/issues/comments{/number}","contents_url":"https://api.github.com/repos/Azure/packer-azure/contents/{+path}","compare_url":"https://api.github.com/repos/Azure/packer-azure/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Azure/packer-azure/merges","archive_url":"https://api.github.com/repos/Azure/packer-azure/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Azure/packer-azure/downloads","issues_url":"https://api.github.com/repos/Azure/packer-azure/issues{/number}","pulls_url":"https://api.github.com/repos/Azure/packer-azure/pulls{/number}","milestones_url":"https://api.github.com/repos/Azure/packer-azure/milestones{/number}","notifications_url":"https://api.github.com/repos/Azure/packer-azure/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Azure/packer-azure/labels{/name}","releases_url":"https://api.github.com/repos/Azure/packer-azure/releases{/id}","deployments_url":"https://api.github.com/repos/Azure/packer-azure/deployments","created_at":"2014-07-07T18:20:40Z","updated_at":"2016-03-24T14:41:10Z","pushed_at":"2016-04-06T21:34:37Z","git_url":"git://github.com/Azure/packer-azure.git","ssh_url":"git@github.com:Azure/packer-azure.git","clone_url":"https://github.com/Azure/packer-azure.git","svn_url":"https://github.com/Azure/packer-azure","homepage":null,"size":71564,"stargazers_count":93,"watchers_count":93,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":42,"mirror_url":null,"open_issues_count":38,"forks":42,"open_issues":38,"watchers":93,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Azure/packer-azure/pulls/236"},"html":{"href":"https://github.com/Azure/packer-azure/pull/236"},"issue":{"href":"https://api.github.com/repos/Azure/packer-azure/issues/236"},"comments":{"href":"https://api.github.com/repos/Azure/packer-azure/issues/236/comments"},"review_comments":{"href":"https://api.github.com/repos/Azure/packer-azure/pulls/236/comments"},"review_comment":{"href":"https://api.github.com/repos/Azure/packer-azure/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Azure/packer-azure/pulls/236/commits"},"statuses":{"href":"https://api.github.com/repos/Azure/packer-azure/statuses/60806af047cf452c570715ac6874a7e013bcd27d"}}}}