{"action":"created","comment":{"url":"https://api.github.com/repos/angular/angular/pulls/comments/187888357","pull_request_review_id":119755754,"id":187888357,"diff_hunk":"@@ -112,6 +112,22 @@ jobs:\n             - \"node_modules\"\n             - \"~/bazel_repository_cache\"\n \n+  aio_preview:\n+    <<: *job_defaults\n+    steps:\n+      - checkout:\n+          <<: *post_checkout\n+      - restore_cache:\n+          key: *cache_key\n+      - run: ./aio/scripts/build-artifacts.sh\n+      - store_artifacts:\n+          # The `path` needs to be kept in synch with the value of\n+          # `OUTPUT_FILE` in `aio/scripts/build-artifacts.sh`\n+          path: aio/tmp/snapshot.tgz","path":".circleci/config.yml","position":15,"original_position":15,"commit_id":"e05aeae020d37202367b3bea6f059b215a8b3304","original_commit_id":"e05aeae020d37202367b3bea6f059b215a8b3304","user":{"login":"gkalpak","id":8604205,"avatar_url":"https://avatars2.githubusercontent.com/u/8604205?v=4","gravatar_id":"","url":"https://api.github.com/users/gkalpak","html_url":"https://github.com/gkalpak","followers_url":"https://api.github.com/users/gkalpak/followers","following_url":"https://api.github.com/users/gkalpak/following{/other_user}","gists_url":"https://api.github.com/users/gkalpak/gists{/gist_id}","starred_url":"https://api.github.com/users/gkalpak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gkalpak/subscriptions","organizations_url":"https://api.github.com/users/gkalpak/orgs","repos_url":"https://api.github.com/users/gkalpak/repos","events_url":"https://api.github.com/users/gkalpak/events{/privacy}","received_events_url":"https://api.github.com/users/gkalpak/received_events","type":"User","site_admin":false},"body":"Would env vars be supported here? If so we could have the values in one place only.","created_at":"2018-05-14T09:28:37Z","updated_at":"2018-05-14T09:38:25Z","html_url":"https://github.com/angular/angular/pull/23576#discussion_r187888357","pull_request_url":"https://api.github.com/repos/angular/angular/pulls/23576","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/angular/angular/pulls/comments/187888357"},"html":{"href":"https://github.com/angular/angular/pull/23576#discussion_r187888357"},"pull_request":{"href":"https://api.github.com/repos/angular/angular/pulls/23576"}}},"pull_request":{"url":"https://api.github.com/repos/angular/angular/pulls/23576","id":184629749,"html_url":"https://github.com/angular/angular/pull/23576","diff_url":"https://github.com/angular/angular/pull/23576.diff","patch_url":"https://github.com/angular/angular/pull/23576.patch","issue_url":"https://api.github.com/repos/angular/angular/issues/23576","number":23576,"state":"open","locked":false,"title":"ci(aio): change AIO preview server stuff to use CircleCI","user":{"login":"petebacondarwin","id":15655,"avatar_url":"https://avatars0.githubusercontent.com/u/15655?v=4","gravatar_id":"","url":"https://api.github.com/users/petebacondarwin","html_url":"https://github.com/petebacondarwin","followers_url":"https://api.github.com/users/petebacondarwin/followers","following_url":"https://api.github.com/users/petebacondarwin/following{/other_user}","gists_url":"https://api.github.com/users/petebacondarwin/gists{/gist_id}","starred_url":"https://api.github.com/users/petebacondarwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petebacondarwin/subscriptions","organizations_url":"https://api.github.com/users/petebacondarwin/orgs","repos_url":"https://api.github.com/users/petebacondarwin/repos","events_url":"https://api.github.com/users/petebacondarwin/events{/privacy}","received_events_url":"https://api.github.com/users/petebacondarwin/received_events","type":"User","site_admin":false},"body":"This is still a Work In Progress. But I thought, as it was getting a bit big, it might be time to get some more feedback.\r\n\r\nThe TS code for the upload server is mostly there; along with unit tests.\r\n\r\nThe system now waits for a CircleCI webhook to tell the upload server that a build has completed.\r\nThe upload server then pulls down the build artifact and passes it along as before to the rest of the preview creation logic.\r\n\r\nThis means that there is no need to store a secret on CircleCI for pushing the artifacts to the upload server; which means that we no longer rely upon JWT.\r\n\r\nThe downloaded artifact is stored in a temp location; this is cleared out along with the actual preview builds by the periodic cleanup task.\r\n\r\nThere are some (self-serving) changes to the testing of components that were not significantly changed for this PR. This includes more use of `async/await` for managing async tests; and also making some API public (rather than protected). This allows us to unit test, while maintaining type safety. Previously, we had to cast to `any` which meant that changes to the API may not be passed through to the unit tests.\r\n\r\nTODO:\r\n\r\n- [x] check for CI success before processing\r\n- [x] consider not downloading an artifact if it has been downloaded already\r\n- [ ] fix up / write more e2e tests\r\n- [x] update the docs\r\n- [ ] consider renaming \"upload server\" to \"preview server\"\r\n- [ ] configure the rest of the environment variables for the new processing\r\n- [ ] ascertain whether we need a CircleCI access token for making the GET requests\r\n- [ ] work out how (and when) to run the PWA-score test; probably by the preview-server triggering a specific CircleCI job via API","created_at":"2018-04-27T13:56:59Z","updated_at":"2018-05-14T09:38:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"be5e05c4065df35f940a1d67b8a0d53c9ed5d86e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":173296525,"url":"https://api.github.com/repos/angular/angular/labels/PR%20state:%20WIP","name":"PR state: WIP","color":"fbca04","default":false},{"id":149476251,"url":"https://api.github.com/repos/angular/angular/labels/cla:%20yes","name":"cla: yes","color":"009800","default":false},{"id":533874619,"url":"https://api.github.com/repos/angular/angular/labels/comp:%20aio","name":"comp: aio","color":"c7def8","default":false},{"id":193817683,"url":"https://api.github.com/repos/angular/angular/labels/comp:%20build%20&%20ci","name":"comp: build & ci","color":"c7def8","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/angular/angular/pulls/23576/commits","review_comments_url":"https://api.github.com/repos/angular/angular/pulls/23576/comments","review_comment_url":"https://api.github.com/repos/angular/angular/pulls/comments{/number}","comments_url":"https://api.github.com/repos/angular/angular/issues/23576/comments","statuses_url":"https://api.github.com/repos/angular/angular/statuses/e05aeae020d37202367b3bea6f059b215a8b3304","head":{"label":"petebacondarwin:aio-circleci-builds","ref":"aio-circleci-builds","sha":"e05aeae020d37202367b3bea6f059b215a8b3304","user":{"login":"petebacondarwin","id":15655,"avatar_url":"https://avatars0.githubusercontent.com/u/15655?v=4","gravatar_id":"","url":"https://api.github.com/users/petebacondarwin","html_url":"https://github.com/petebacondarwin","followers_url":"https://api.github.com/users/petebacondarwin/followers","following_url":"https://api.github.com/users/petebacondarwin/following{/other_user}","gists_url":"https://api.github.com/users/petebacondarwin/gists{/gist_id}","starred_url":"https://api.github.com/users/petebacondarwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petebacondarwin/subscriptions","organizations_url":"https://api.github.com/users/petebacondarwin/orgs","repos_url":"https://api.github.com/users/petebacondarwin/repos","events_url":"https://api.github.com/users/petebacondarwin/events{/privacy}","received_events_url":"https://api.github.com/users/petebacondarwin/received_events","type":"User","site_admin":false},"repo":{"id":27181953,"name":"angular","full_name":"petebacondarwin/angular","owner":{"login":"petebacondarwin","id":15655,"avatar_url":"https://avatars0.githubusercontent.com/u/15655?v=4","gravatar_id":"","url":"https://api.github.com/users/petebacondarwin","html_url":"https://github.com/petebacondarwin","followers_url":"https://api.github.com/users/petebacondarwin/followers","following_url":"https://api.github.com/users/petebacondarwin/following{/other_user}","gists_url":"https://api.github.com/users/petebacondarwin/gists{/gist_id}","starred_url":"https://api.github.com/users/petebacondarwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petebacondarwin/subscriptions","organizations_url":"https://api.github.com/users/petebacondarwin/orgs","repos_url":"https://api.github.com/users/petebacondarwin/repos","events_url":"https://api.github.com/users/petebacondarwin/events{/privacy}","received_events_url":"https://api.github.com/users/petebacondarwin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/petebacondarwin/angular","description":null,"fork":true,"url":"https://api.github.com/repos/petebacondarwin/angular","forks_url":"https://api.github.com/repos/petebacondarwin/angular/forks","keys_url":"https://api.github.com/repos/petebacondarwin/angular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/petebacondarwin/angular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/petebacondarwin/angular/teams","hooks_url":"https://api.github.com/repos/petebacondarwin/angular/hooks","issue_events_url":"https://api.github.com/repos/petebacondarwin/angular/issues/events{/number}","events_url":"https://api.github.com/repos/petebacondarwin/angular/events","assignees_url":"https://api.github.com/repos/petebacondarwin/angular/assignees{/user}","branches_url":"https://api.github.com/repos/petebacondarwin/angular/branches{/branch}","tags_url":"https://api.github.com/repos/petebacondarwin/angular/tags","blobs_url":"https://api.github.com/repos/petebacondarwin/angular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/petebacondarwin/angular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/petebacondarwin/angular/git/refs{/sha}","trees_url":"https://api.github.com/repos/petebacondarwin/angular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/petebacondarwin/angular/statuses/{sha}","languages_url":"https://api.github.com/repos/petebacondarwin/angular/languages","stargazers_url":"https://api.github.com/repos/petebacondarwin/angular/stargazers","contributors_url":"https://api.github.com/repos/petebacondarwin/angular/contributors","subscribers_url":"https://api.github.com/repos/petebacondarwin/angular/subscribers","subscription_url":"https://api.github.com/repos/petebacondarwin/angular/subscription","commits_url":"https://api.github.com/repos/petebacondarwin/angular/commits{/sha}","git_commits_url":"https://api.github.com/repos/petebacondarwin/angular/git/commits{/sha}","comments_url":"https://api.github.com/repos/petebacondarwin/angular/comments{/number}","issue_comment_url":"https://api.github.com/repos/petebacondarwin/angular/issues/comments{/number}","contents_url":"https://api.github.com/repos/petebacondarwin/angular/contents/{+path}","compare_url":"https://api.github.com/repos/petebacondarwin/angular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/petebacondarwin/angular/merges","archive_url":"https://api.github.com/repos/petebacondarwin/angular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/petebacondarwin/angular/downloads","issues_url":"https://api.github.com/repos/petebacondarwin/angular/issues{/number}","pulls_url":"https://api.github.com/repos/petebacondarwin/angular/pulls{/number}","milestones_url":"https://api.github.com/repos/petebacondarwin/angular/milestones{/number}","notifications_url":"https://api.github.com/repos/petebacondarwin/angular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/petebacondarwin/angular/labels{/name}","releases_url":"https://api.github.com/repos/petebacondarwin/angular/releases{/id}","deployments_url":"https://api.github.com/repos/petebacondarwin/angular/deployments","created_at":"2014-11-26T15:01:46Z","updated_at":"2018-04-12T10:39:10Z","pushed_at":"2018-05-14T09:01:22Z","git_url":"git://github.com/petebacondarwin/angular.git","ssh_url":"git@github.com:petebacondarwin/angular.git","clone_url":"https://github.com/petebacondarwin/angular.git","svn_url":"https://github.com/petebacondarwin/angular","homepage":null,"size":77875,"stargazers_count":2,"watchers_count":2,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"angular:master","ref":"master","sha":"d4b8b2440673049c58d51b0ae4afceb028d62cc0","user":{"login":"angular","id":139426,"avatar_url":"https://avatars3.githubusercontent.com/u/139426?v=4","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"repo":{"id":24195339,"name":"angular","full_name":"angular/angular","owner":{"login":"angular","id":139426,"avatar_url":"https://avatars3.githubusercontent.com/u/139426?v=4","gravatar_id":"","url":"https://api.github.com/users/angular","html_url":"https://github.com/angular","followers_url":"https://api.github.com/users/angular/followers","following_url":"https://api.github.com/users/angular/following{/other_user}","gists_url":"https://api.github.com/users/angular/gists{/gist_id}","starred_url":"https://api.github.com/users/angular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/angular/subscriptions","organizations_url":"https://api.github.com/users/angular/orgs","repos_url":"https://api.github.com/users/angular/repos","events_url":"https://api.github.com/users/angular/events{/privacy}","received_events_url":"https://api.github.com/users/angular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/angular/angular","description":"One framework. Mobile & desktop.","fork":false,"url":"https://api.github.com/repos/angular/angular","forks_url":"https://api.github.com/repos/angular/angular/forks","keys_url":"https://api.github.com/repos/angular/angular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/angular/angular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/angular/angular/teams","hooks_url":"https://api.github.com/repos/angular/angular/hooks","issue_events_url":"https://api.github.com/repos/angular/angular/issues/events{/number}","events_url":"https://api.github.com/repos/angular/angular/events","assignees_url":"https://api.github.com/repos/angular/angular/assignees{/user}","branches_url":"https://api.github.com/repos/angular/angular/branches{/branch}","tags_url":"https://api.github.com/repos/angular/angular/tags","blobs_url":"https://api.github.com/repos/angular/angular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/angular/angular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/angular/angular/git/refs{/sha}","trees_url":"https://api.github.com/repos/angular/angular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/angular/angular/statuses/{sha}","languages_url":"https://api.github.com/repos/angular/angular/languages","stargazers_url":"https://api.github.com/repos/angular/angular/stargazers","contributors_url":"https://api.github.com/repos/angular/angular/contributors","subscribers_url":"https://api.github.com/repos/angular/angular/subscribers","subscription_url":"https://api.github.com/repos/angular/angular/subscription","commits_url":"https://api.github.com/repos/angular/angular/commits{/sha}","git_commits_url":"https://api.github.com/repos/angular/angular/git/commits{/sha}","comments_url":"https://api.github.com/repos/angular/angular/comments{/number}","issue_comment_url":"https://api.github.com/repos/angular/angular/issues/comments{/number}","contents_url":"https://api.github.com/repos/angular/angular/contents/{+path}","compare_url":"https://api.github.com/repos/angular/angular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/angular/angular/merges","archive_url":"https://api.github.com/repos/angular/angular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/angular/angular/downloads","issues_url":"https://api.github.com/repos/angular/angular/issues{/number}","pulls_url":"https://api.github.com/repos/angular/angular/pulls{/number}","milestones_url":"https://api.github.com/repos/angular/angular/milestones{/number}","notifications_url":"https://api.github.com/repos/angular/angular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/angular/angular/labels{/name}","releases_url":"https://api.github.com/repos/angular/angular/releases{/id}","deployments_url":"https://api.github.com/repos/angular/angular/deployments","created_at":"2014-09-18T16:12:01Z","updated_at":"2018-05-14T09:37:37Z","pushed_at":"2018-05-14T09:28:19Z","git_url":"git://github.com/angular/angular.git","ssh_url":"git@github.com:angular/angular.git","clone_url":"https://github.com/angular/angular.git","svn_url":"https://github.com/angular/angular","homepage":"https://angular.io","size":80898,"stargazers_count":36199,"watchers_count":36199,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8776,"mirror_url":null,"archived":false,"open_issues_count":2375,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":8776,"open_issues":2375,"watchers":36199,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/angular/angular/pulls/23576"},"html":{"href":"https://github.com/angular/angular/pull/23576"},"issue":{"href":"https://api.github.com/repos/angular/angular/issues/23576"},"comments":{"href":"https://api.github.com/repos/angular/angular/issues/23576/comments"},"review_comments":{"href":"https://api.github.com/repos/angular/angular/pulls/23576/comments"},"review_comment":{"href":"https://api.github.com/repos/angular/angular/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/angular/angular/pulls/23576/commits"},"statuses":{"href":"https://api.github.com/repos/angular/angular/statuses/e05aeae020d37202367b3bea6f059b215a8b3304"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"gkalpak"}}