2 # Upload all the artifacts to our S3 bucket. All the files inside ${upload_dir}
3 # will be uploaded to the deploy bucket and eventually signed and released in
4 # static.rust-lang.org.
9 source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
11 upload_dir="$(mktemp -d)"
13 # Release tarballs produced by a dist builder.
14 if [[ "${DEPLOY-0}" -eq "1" ]] || [[ "${DEPLOY_ALT-0}" -eq "1" ]]; then
17 dist_dir=obj/build/dist
19 rm -rf "${dist_dir}/doc"
20 cp -r "${dist_dir}"/* "${upload_dir}"
23 # CPU usage statistics.
24 cp cpu-usage.csv "${upload_dir}/cpu-${CI_JOB_NAME}.csv"
27 if [[ -n "${DEPLOY_TOOLSTATES_JSON+x}" ]]; then
28 cp /tmp/toolstate/toolstates.json "${upload_dir}/${DEPLOY_TOOLSTATES_JSON}"
31 echo "Files that will be uploaded:"
32 ls -lah "${upload_dir}"
35 deploy_dir="rustc-builds"
36 if [[ "${DEPLOY_ALT-0}" -eq "1" ]]; then
37 deploy_dir="rustc-builds-alt"
39 deploy_url="s3://${DEPLOY_BUCKET}/${deploy_dir}/$(ciCommit)"
41 retry aws s3 cp --no-progress --recursive --acl public-read "${upload_dir}" "${deploy_url}"