File tree 3 files changed +12
-4
lines changed
3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 34
34
CI_JOB_NAME : " ${{ matrix.name }}"
35
35
SCCACHE_BUCKET : rust-lang-gha-caches
36
36
TOOLSTATE_REPO : " https://github.com/pietroalbini/rust-toolstate"
37
+ CACHE_DOMAIN : ci-caches-gha.rust-lang.org
37
38
if : " github.event_name == 'pull_request'"
38
39
strategy :
39
40
matrix :
@@ -146,6 +147,7 @@ jobs:
146
147
TOOLSTATE_PUBLISH : 1
147
148
CACHES_AWS_ACCESS_KEY_ID : AKIA46X5W6CZOMUQATD5
148
149
ARTIFACTS_AWS_ACCESS_KEY_ID : AKIA46X5W6CZH5AYXDVF
150
+ CACHE_DOMAIN : ci-caches-gha.rust-lang.org
149
151
if : " github.event_name == 'push' && github.ref == 'refs/heads/try' && github.repository == 'rust-lang-ci/rust'"
150
152
strategy :
151
153
matrix :
@@ -255,6 +257,7 @@ jobs:
255
257
TOOLSTATE_PUBLISH : 1
256
258
CACHES_AWS_ACCESS_KEY_ID : AKIA46X5W6CZOMUQATD5
257
259
ARTIFACTS_AWS_ACCESS_KEY_ID : AKIA46X5W6CZH5AYXDVF
260
+ CACHE_DOMAIN : ci-caches-gha.rust-lang.org
258
261
if : " github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
259
262
strategy :
260
263
matrix :
@@ -606,6 +609,7 @@ jobs:
606
609
TOOLSTATE_PUBLISH : 1
607
610
CACHES_AWS_ACCESS_KEY_ID : AKIA46X5W6CZOMUQATD5
608
611
ARTIFACTS_AWS_ACCESS_KEY_ID : AKIA46X5W6CZH5AYXDVF
612
+ CACHE_DOMAIN : ci-caches-gha.rust-lang.org
609
613
if : " github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'rust-lang-ci/rust'"
610
614
steps :
611
615
- name : checkout the source code
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ dist=$objdir/build/dist
17
17
18
18
source " $ci_dir /shared.sh"
19
19
20
+ CACHE_DOMAIN=" ${CACHE_DOMAIN:- ci-caches.rust-lang.org} "
21
+
20
22
if [ -f " $docker_dir /$image /Dockerfile" ]; then
21
23
if [ " $CI " != " " ]; then
22
24
hash_key=/tmp/.docker-hash-key.txt
@@ -38,9 +40,7 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
38
40
cksum=$( sha512sum $hash_key | \
39
41
awk ' {print $1}' )
40
42
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 "
44
44
45
45
echo " Attempting to download $url "
46
46
rm -f /tmp/rustci_docker_cache
@@ -65,7 +65,9 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
65
65
-f " $dockerfile " \
66
66
" $context "
67
67
68
- if [ " $upload " != " " ]; then
68
+ if [ " $CI " != " " ]; then
69
+ s3url=" s3://$SCCACHE_BUCKET /docker/$cksum "
70
+ upload=" aws s3 cp - $s3url "
69
71
digest=$( docker inspect rust-ci --format ' {{.Id}}' )
70
72
echo " Built container $digest "
71
73
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:
37
37
- &public-variables
38
38
SCCACHE_BUCKET : rust-lang-gha-caches
39
39
TOOLSTATE_REPO : https://github.com/pietroalbini/rust-toolstate
40
+ CACHE_DOMAIN : ci-caches-gha.rust-lang.org
40
41
41
42
- &prod-variables
42
43
SCCACHE_BUCKET : rust-lang-gha-caches
@@ -51,6 +52,7 @@ x--expand-yaml-anchors--remove:
51
52
# (caches, artifacts...).
52
53
CACHES_AWS_ACCESS_KEY_ID : AKIA46X5W6CZOMUQATD5
53
54
ARTIFACTS_AWS_ACCESS_KEY_ID : AKIA46X5W6CZH5AYXDVF
55
+ CACHE_DOMAIN : ci-caches-gha.rust-lang.org
54
56
55
57
- &base-job
56
58
env : {}
You can’t perform that action at this time.
0 commit comments