Skip to content

Commit

Permalink
Rollup merge of rust-lang#61485 - pietroalbini:retry-azure-upload, r=…
Browse files Browse the repository at this point in the history
…alexcrichton

azure: retry s3 upload if it fails

We had some cases (like [this](https://dev.azure.com/rust-lang/e71b0ddf-dd27-435a-873c-e30f86eea377/_apis/build/builds/370/logs/734) a few hours ago) when uploading to S3 fails with a network error. This retries the upload if it fails.

r? @alexcrichton
  • Loading branch information
Centril authored Jun 4, 2019
2 parents f8a2363 + 80df64b commit 31d7aa4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .azure-pipelines/steps/run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ steps:
# bucket.
- bash: |
set -e
source src/ci/shared.sh
if [ "$AGENT_OS" = "Linux" ]; then
rm -rf obj/build/dist/doc
upload_dir=obj/build/dist
Expand All @@ -130,7 +131,7 @@ steps:
if [ "$DEPLOY_ALT" == "1" ]; then
deploy_dir=rustc-builds-alt
fi
aws s3 cp --no-progress --recursive --acl public-read ./$upload_dir s3://$DEPLOY_BUCKET/$deploy_dir/$BUILD_SOURCEVERSION
retry aws s3 cp --no-progress --recursive --acl public-read ./$upload_dir s3://$DEPLOY_BUCKET/$deploy_dir/$BUILD_SOURCEVERSION
env:
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
condition: and(succeeded(), or(eq(variables.DEPLOY, '1'), eq(variables.DEPLOY_ALT, '1')))
Expand Down

0 comments on commit 31d7aa4

Please sign in to comment.