Commit Graph

17 Commits

Author SHA1 Message Date
George Kalpakas fcb68cc139 fix(docs-infra): better detect failed attempts to update the preview server Docker container (#37015)
In order to avoid unnecessary operations, the `update-preview-server.sh`
script, that is used to update the PR preview server Docker container,
will only try to update the Docker container if either any files in the
`aio/aio-builds-setup/` directory have changed since the last update or
if a previous update failed. A failed previous update is detected by
checking whether the temporary `aio-builds:provisional` Docker image
still exists. This temporary image is created during the update
operation and is renamed to `aio-builds:latest` if the update goes well.

Previously, the update script was not able to detect a previous failed
attempt if the operation failed before creating the
`aio-builds:provisional` Docker image, such as if the `create-image.sh`
script failed. This could lead to a situation where the preview server
Docker container would not be updated after a failed attempt.

This commit improves the logic for detecting failed attempts to account
for this type of failures. It does this by not removing an older
`aio-builds:provisional` Docker image until a new one is successfully
created.

NOTE: While this is not full-proof, it is an improvement as it
      eliminates a certain kind of failures.

PR Close #37015
2020-05-18 10:24:20 -07:00
George Kalpakas d1a8afbbd0 refactor(docs-infra): update argument order for `update-preview-server.sh` script (#36837)
Update the order in which the `update-preview-server.sh` script expects
its arguments (and the associated docs) to be consistent with the order
of arguments in other commands/docs (such as
`vm-setup--start-docker-container.md`).

PR Close #36837
2020-05-05 17:46:46 -07:00
George Kalpakas 3e39fef274 refactor(aio): improve logging output in `update-preview-server.sh` (#24071)
PR Close #24071
2018-05-25 13:44:44 -04:00
George Kalpakas 910735d732 build: fix `yarn install` command (`--freeze-lockfile` --> `--frozen-lockfile`) 2017-10-20 10:14:30 -07:00
Peter Bacon Darwin dc038113a5 build(aio): freeze yarn lockfile for aio-builds-setup scripts (#19616)
PR Close #19616
2017-10-11 11:52:35 -07:00
George Kalpakas 0e00265647 build(aio): disable cache when building a new docker image for the preview server (#19391) 2017-09-28 09:28:54 -07:00
Georgios Kalpakas 7c4ac68e66 build(aio): remove unused script and GitHub token
Since 808bd4af4, we are no longer pre-verifying PRs before uploading the build
artifacts to the preview server, thus we no longer need the
`travis-preverify-pr.sh` script or the `GITHUB_TEAM_MEMBERSHIP_CHECK_KEY`
variable.
2017-07-11 11:03:29 +01:00
Georgios Kalpakas f1626574dd fix(aio): build `scripts-js` before creating a new docker image for the preview server
When creating a new docker image for the preview server, the TypeScript source
code in `scripts-js/` is not copied over. Instead only the generated JavaScript
core in `scripts-js/dist/` are. Because of that, it is necessary to have run
`yarn build` before running `docker build`, so that the new docker image
contains the latest changes in `scripts-js/`.

This was previously part of the `create-image.sh` script, but was accidentally
removed in 21d213dfc.
2017-06-27 10:11:06 -07:00
Georgios Kalpakas 8ae0eec230 feat(aio): enable previews for any PR
This commit introduces the ability to show previews for PRs by any author. It works as follows:

- The build artifacts of all PRs are uploaded to the preview server.
- Automatically verified PRs (i.e. from trusted authors or having a specific label) are deployed and
  publicly accessible as usual.
- PRs that could not be automatically verified are stored for later use (after re-verification).
- A PR can be marked as "trusted" and make its preview publicly accessible by adding the GitHub
  label specified in the `AIO_TRUSTED_PR_LABEL` env var of the preview server.

At the moment, there is no automatic mechanism for notifying the preview server about changes to the
PR's verification status. The PR's "visibility" will be checked and updated every time a new build
is uploaded.
2017-06-23 11:54:20 -07:00
Georgios Kalpakas 3361a7b834 build(aio): minor `update-preview-server.sh` improvements 2017-05-18 14:41:54 +01:00
Georgios Kalpakas 9466908c22 build(aio): add script for updating the preview server 2017-05-18 08:21:25 +01:00
Georgios Kalpakas 06264645fd build: use subshells when changing directories
This prevents being left in the wrong directory in case of error.
2017-05-12 12:19:51 -07:00
Georgios Kalpakas 21d213dfc7 refactor(aio): drop `run` (from `yarn run`), rename script and remove unnecessary cmds 2017-05-12 11:37:21 -07:00
Georgios Kalpakas 3065fc6cca ci(aio): build `aio-builds-setup` scripts before pre-verifying PR
(Coincidentally), this wasn't an issue before fdfeaaf1f, because
pre-verification was run after `test.sh`, during which `aio-builds-setup` was
built.
Now that `deploy-staging.sh` is being run before `test.sh`, we need to build
the `aio-builds-setup` scripts first.
2017-05-12 11:37:21 -07:00
Georgios Kalpakas 4347cb2119 ci(aio): whitelist 'aio-contributors' for deploying PR previews 2017-03-15 16:11:29 -07:00
Georgios Kalpakas 174d4c8ef7 ci(aio): do not deploy PR if preconditions not met
This avoids incorrectly failing the build if the PR author is not a member of one of the whitelisted GitHub teams.
2017-03-07 18:24:45 -08:00
Georgios Kalpakas 4ca772eea3 refactor(aio): move scripts into `scripts/` directory 2017-03-07 18:24:45 -08:00