angular-cn/aio/aio-builds-setup/scripts
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
..
_env.sh
create-image.sh build: fix `yarn install` command (`--freeze-lockfile` --> `--frozen-lockfile`) 2017-10-20 10:14:30 -07:00
test.sh build: fix `yarn install` command (`--freeze-lockfile` --> `--frozen-lockfile`) 2017-10-20 10:14:30 -07:00
update-preview-server.sh fix(docs-infra): better detect failed attempts to update the preview server Docker container (#37015) 2020-05-18 10:24:20 -07:00