about summary refs log tree commit diff
path: root/src/ci/docker
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-05-11 23:14:06 +0000
committerbors <bors@rust-lang.org>2020-05-11 23:14:06 +0000
commit09c817eeb29e764cfc12d0a8d94841e3ffe34023 (patch)
treef118ca7b1552fec31eb6a93009347897c3e0c18e /src/ci/docker
parent99cb9ccb9ca2067ad6e60508e3d52da77396b2f1 (diff)
parentdfa3677bee58a39296daf85645eff7d51cbad8ae (diff)
downloadrust-09c817eeb29e764cfc12d0a8d94841e3ffe34023.tar.gz
rust-09c817eeb29e764cfc12d0a8d94841e3ffe34023.zip
Auto merge of #72120 - Dylan-DPC:rollup-ca0tur2, r=Dylan-DPC
Rollup of 10 pull requests

Successful merges:

 - #72014 (Deprecated emoji)
 - #72019 (Fix debug assertion in error code)
 - #72027 (Use CDN for ci-caches on download)
 - #72044 (use min_specialization for some rustc crates where it requires no changes)
 - #72052 (display `ConstKind::Param`)
 - #72067 (Emit a warning when optimization fuel runs out)
 - #72072 (doc: minus (U+2212) instead of dash (U+002D) for negative infinity)
 - #72077 (Improve E0571 wording)
 - #72107 (Clean up E0579 explanation)
 - #72109 (Fix clippy warnings)

Failed merges:

r? @ghost
Diffstat (limited to 'src/ci/docker')
-rwxr-xr-xsrc/ci/docker/run.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ci/docker/run.sh b/src/ci/docker/run.sh
index f29f9f3bf1c..d891ad1b668 100755
--- a/src/ci/docker/run.sh
+++ b/src/ci/docker/run.sh
@@ -17,6 +17,8 @@ dist=$objdir/build/dist
 
 source "$ci_dir/shared.sh"
 
+CACHE_DOMAIN="${CACHE_DOMAIN:-ci-caches.rust-lang.org}"
+
 if [ -f "$docker_dir/$image/Dockerfile" ]; then
     if [ "$CI" != "" ]; then
       hash_key=/tmp/.docker-hash-key.txt
@@ -38,9 +40,7 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
       cksum=$(sha512sum $hash_key | \
         awk '{print $1}')
 
-      s3url="s3://$SCCACHE_BUCKET/docker/$cksum"
-      url="https://$SCCACHE_BUCKET.s3.amazonaws.com/docker/$cksum"
-      upload="aws s3 cp - $s3url"
+      url="https://$CACHE_DOMAIN/docker/$cksum"
 
       echo "Attempting to download $url"
       rm -f /tmp/rustci_docker_cache
@@ -65,7 +65,9 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
       -f "$dockerfile" \
       "$context"
 
-    if [ "$upload" != "" ]; then
+    if [ "$CI" != "" ]; then
+      s3url="s3://$SCCACHE_BUCKET/docker/$cksum"
+      upload="aws s3 cp - $s3url"
       digest=$(docker inspect rust-ci --format '{{.Id}}')
       echo "Built container $digest"
       if ! grep -q "$digest" <(echo "$loaded_images"); then