File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 3434 CI_JOB_NAME : " ${{ matrix.name }}"
3535 SCCACHE_BUCKET : rust-lang-gha-caches
3636 TOOLSTATE_REPO : " https://github.com/pietroalbini/rust-toolstate"
37+ CACHE_DOMAIN : ci-caches-gha.rust-lang.org
3738 if : " github.event_name == 'pull_request'"
3839 strategy :
3940 matrix :
@@ -146,6 +147,7 @@ jobs:
146147 TOOLSTATE_PUBLISH : 1
147148 CACHES_AWS_ACCESS_KEY_ID : AKIA46X5W6CZOMUQATD5
148149 ARTIFACTS_AWS_ACCESS_KEY_ID : AKIA46X5W6CZH5AYXDVF
150+ CACHE_DOMAIN : ci-caches-gha.rust-lang.org
149151 if : " github.event_name == 'push' && github.ref == 'refs/heads/try' && github.repository == 'rust-lang-ci/rust'"
150152 strategy :
151153 matrix :
@@ -255,6 +257,7 @@ jobs:
255257 TOOLSTATE_PUBLISH : 1
256258 CACHES_AWS_ACCESS_KEY_ID : AKIA46X5W6CZOMUQATD5
257259 ARTIFACTS_AWS_ACCESS_KEY_ID : AKIA46X5W6CZH5AYXDVF
260+ CACHE_DOMAIN : ci-caches-gha.rust-lang.org
258261 if : " github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
259262 strategy :
260263 matrix :
@@ -606,6 +609,7 @@ jobs:
606609 TOOLSTATE_PUBLISH : 1
607610 CACHES_AWS_ACCESS_KEY_ID : AKIA46X5W6CZOMUQATD5
608611 ARTIFACTS_AWS_ACCESS_KEY_ID : AKIA46X5W6CZH5AYXDVF
612+ CACHE_DOMAIN : ci-caches-gha.rust-lang.org
609613 if : " github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'rust-lang-ci/rust'"
610614 steps :
611615 - name : checkout the source code
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ dist=$objdir/build/dist
1717
1818source " $ci_dir /shared.sh"
1919
20+ CACHE_DOMAIN=" ${CACHE_DOMAIN:- ci-caches.rust-lang.org} "
21+
2022if [ -f " $docker_dir /$image /Dockerfile" ]; then
2123 if [ " $CI " != " " ]; then
2224 hash_key=/tmp/.docker-hash-key.txt
@@ -38,9 +40,7 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
3840 cksum=$( sha512sum $hash_key | \
3941 awk ' {print $1}' )
4042
41- s3url=" s3://$SCCACHE_BUCKET /docker/$cksum "
42- url=" https://$SCCACHE_BUCKET .s3.amazonaws.com/docker/$cksum "
43- upload=" aws s3 cp - $s3url "
43+ url=" https://$CACHE_DOMAIN /docker/$cksum "
4444
4545 echo " Attempting to download $url "
4646 rm -f /tmp/rustci_docker_cache
@@ -65,7 +65,9 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
6565 -f " $dockerfile " \
6666 " $context "
6767
68- if [ " $upload " != " " ]; then
68+ if [ " $CI " != " " ]; then
69+ s3url=" s3://$SCCACHE_BUCKET /docker/$cksum "
70+ upload=" aws s3 cp - $s3url "
6971 digest=$( docker inspect rust-ci --format ' {{.Id}}' )
7072 echo " Built container $digest "
7173 if ! grep -q " $digest " <( echo " $loaded_images " ) ; then
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ x--expand-yaml-anchors--remove:
3737 - &public-variables
3838 SCCACHE_BUCKET : rust-lang-gha-caches
3939 TOOLSTATE_REPO : https://github.com/pietroalbini/rust-toolstate
40+ CACHE_DOMAIN : ci-caches-gha.rust-lang.org
4041
4142 - &prod-variables
4243 SCCACHE_BUCKET : rust-lang-gha-caches
@@ -51,6 +52,7 @@ x--expand-yaml-anchors--remove:
5152 # (caches, artifacts...).
5253 CACHES_AWS_ACCESS_KEY_ID : AKIA46X5W6CZOMUQATD5
5354 ARTIFACTS_AWS_ACCESS_KEY_ID : AKIA46X5W6CZH5AYXDVF
55+ CACHE_DOMAIN : ci-caches-gha.rust-lang.org
5456
5557 - &base-job
5658 env : {}
You can’t perform that action at this time.
0 commit comments