Commit Graph

15 Commits

Author SHA1 Message Date
George Kalpakas 6d6b0ff1ad 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:19 -07:00
George Kalpakas fc0a7959a4 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:19 -07:00
Pete Bacon Darwin d604ef7cf0 ci(docs-infra): add explicit return types to methods 2018-08-16 10:26:13 +01:00
Pete Bacon Darwin 36c4c8daa9 ci(docs-infra): improve preview-server logging 2018-08-16 10:26:13 +01:00
Pete Bacon Darwin cc6f36a9d7 ci(docs-infra): change AIO preview server stuff to pull builds from CircleCI
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.
2018-08-16 10:26:13 +01: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