15 Commits

Author SHA1 Message Date
George Kalpakas
2e0de01372 feat(docs-infra): add API endpoint for checking if PR can have preview (#25671)
There several reasons why PRs cannot have (public) previews:
- The PR did not affect any relevant files (e.g. non-spec files in
  `aio/` or `packages/`).
- The PR cannot be automatically verified as "trusted" (based on its
  author or labels).

Note:
The endpoint does not check whether there currently is a (public)
preview for the specified PR; only whether there can be one.

PR Close #25671
2018-09-26 15:26:25 -07:00
George Kalpakas
c7da5d8cfd refactor(docs-infra): use mockable logger (#25671)
Related discussion:
https://github.com/angular/angular/pull/23576#discussion_r187925949.

PR Close #25671
2018-09-26 15:26:25 -07:00
Pete Bacon Darwin
860b79289f ci(docs-infra): add explicit return types to methods (#25554)
PR Close #25554
2018-08-17 13:47:54 -07:00
Pete Bacon Darwin
b519d41f42 ci(docs-infra): improve preview-server logging (#25554)
PR Close #25554
2018-08-17 13:47:54 -07:00
Pete Bacon Darwin
faf184ad63 ci(docs-infra): change AIO preview server stuff to pull builds from CircleCI (#25554)
Previously, Travis pushed the build artitfacts to the preview server.
This required us to use JWT to secure the POST request from Travis, to
ensure we couldn't receive malicious builds.

JWT has been deprecated and we are moving our builds to CircleCI.

This commit rewrites the TypeScript part of the preview server that
handles converting build artifact into hosted previews of the docs.

PR Close #25554
2018-08-17 13:47:54 -07:00
George Kalpakas
ea143e7498 build(docs-infra): upgrade preview server to latest @types/shelljs (#24372)
PR Close #24372
2018-06-11 09:18:46 -07:00
George Kalpakas
620407720c build(aio): upgrade all preview server dependencies 2017-09-25 12:01:22 -07:00
Georgios Kalpakas
4268c82898 feat(aio): use shorter URLs for previews
Use the 7 first characters of the 40-chars long SHAs for shorter/cleaner URLs.
The collision probability is extremely low (since all SHAs are further
"namespaced" under the corresponding PR). In case of a collision, the second PR
will not be deployed, in order to avoid overwriting the original build.

(This is a design decision to keep the implementation simple. It can be changed
later if necessary.)
2017-06-29 09:35:22 -07:00
Georgios Kalpakas
3c4eef99be fix(aio): clean up non-public previews
The previous clean-up code for PR directories on the preview server assumed that
all directories were named after the PR number. With the changes introduced
in #17640 it is possible to have PR directories that do not follow that naming
convention (e.g. "non-public" directories).

This PR ensures that both public and non-public directories are removed when
cleaning up.
2017-06-29 09:35:22 -07:00
Georgios Kalpakas
f90b35a85e test(aio): add e2e tests for non-public previews 2017-06-23 11:54:20 -07:00
George Kalpakas
593fe5ed25 build(aio): enable HTTP/2 on the preview server (#16826)
Fixes #16780
2017-05-16 21:07:28 -07:00
Georgios Kalpakas
c8d87a936b feat(aio): add support for HTTPS (certificates provided by host - fallback to self-signed) 2017-03-07 18:24:45 -08:00
Georgios Kalpakas
9df9bdc0f5 style(aio): correctly type tuple 2017-03-07 18:24:45 -08:00
Georgios Kalpakas
c8ead9bcd0 refactor(aio): use types intead of interfaces for functions 2017-03-07 18:24:45 -08:00
Georgios Kalpakas
115164033b ci(aio): add initial implementation for aio-builds setup 2017-03-07 18:24:45 -08:00