Skip to content

Commit ec206f2

Browse files
authored
Rollup merge of rust-lang#61485 - pietroalbini:retry-azure-upload, r=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
2 parents ae4939e + 80df64b commit ec206f2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.azure-pipelines/steps/run.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ steps:
118118
# bucket.
119119
- bash: |
120120
set -e
121+
source src/ci/shared.sh
121122
if [ "$AGENT_OS" = "Linux" ]; then
122123
rm -rf obj/build/dist/doc
123124
upload_dir=obj/build/dist
@@ -130,7 +131,7 @@ steps:
130131
if [ "$DEPLOY_ALT" == "1" ]; then
131132
deploy_dir=rustc-builds-alt
132133
fi
133-
aws s3 cp --no-progress --recursive --acl public-read ./$upload_dir s3://$DEPLOY_BUCKET/$deploy_dir/$BUILD_SOURCEVERSION
134+
retry aws s3 cp --no-progress --recursive --acl public-read ./$upload_dir s3://$DEPLOY_BUCKET/$deploy_dir/$BUILD_SOURCEVERSION
134135
env:
135136
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
136137
condition: and(succeeded(), or(eq(variables.DEPLOY, '1'), eq(variables.DEPLOY_ALT, '1')))

0 commit comments

Comments
 (0)