Skip to content

Commit 869ddd8

Browse files
committed
ci: still use aws for caches
1 parent abd4b3a commit 869ddd8

File tree

7 files changed

+17
-40
lines changed

7 files changed

+17
-40
lines changed

.azure-pipelines/auto.fanout.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ jobs:
160160
161161
- script: |
162162
REM md sccache
163-
REM powershell -Command "iwr -outf sccache\sccache.exe https://rustlangtools.blob.core.windows.net/public/stable-x86_64-pc-windows-msvc.sccache.exe"
163+
REM powershell -Command "iwr -outf sccache\sccache.exe https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2018-04-26-sccache-x86_64-pc-windows-msvc"
164164
echo ##vso[task.prependpath]%CD%\sccache
165165
displayName: Download and install sccache
166166
@@ -392,7 +392,7 @@ jobs:
392392
mkdir -p $HOME/rustsrc
393393
echo "##vso[task.setvariable variable=PATH;]$PATH"
394394
395-
curl -fo /usr/local/bin/sccache https://rustlangtools.blob.core.windows.net/public/stable-x86_64-apple-darwin.sccache
395+
curl -fo /usr/local/bin/sccache https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2018-04-02-sccache-x86_64-apple-darwin
396396
chmod +x /usr/local/bin/sccache
397397
398398
curl -fo /usr/local/bin/stamp https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2017-03-17-stamp-x86_64-apple-darwin

.azure-pipelines/auto.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
#
22
# Azure Pipelines "auto" branch build for Rust on Linux, macOS, and Windows.
33
#
4-
# Notes:
5-
# To get sccache working, I (John Erickson) had to build it with the Azure feature enabled
6-
# and with openssl statically-linked for Linux.
7-
# Here's the build (with a backpointer to source) of where the bits came from:
8-
# https://dev.azure.com/johnterickson/rust-lang/_build/results?buildId=275
94

105
pr: none
116
# trigger:

.azure-pipelines/steps/macos.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ steps:
33

44
- bash: |
55
export PATH=$PATH:$HOME/.local/bin:$HOME/Library/Python/2.7/bin/
6-
mkdir -p $HOME/rustsrc
6+
mkdir -p $HOME/rustsrc
77
echo "##vso[task.setvariable variable=PATH;]$PATH"
88
9-
curl -fo /usr/local/bin/sccache https://rustlangtools.blob.core.windows.net/public/stable-x86_64-apple-darwin.sccache
9+
curl -fo /usr/local/bin/sccache https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2018-04-02-sccache-x86_64-apple-darwin
1010
chmod +x /usr/local/bin/sccache
1111
1212
curl -fo /usr/local/bin/stamp https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2017-03-17-stamp-x86_64-apple-darwin
1313
chmod +x /usr/local/bin/stamp
14-
14+
1515
export CC=`pwd`/clang+llvm-7.0.0-x86_64-apple-darwin/bin/clang
1616
echo "##vso[task.setvariable variable=CC]$CC"
17-
17+
1818
export CXX=`pwd`/clang+llvm-7.0.0-x86_64-apple-darwin/bin/clang++
1919
echo "##vso[task.setvariable variable=CXX]$CXX"
20-
20+
2121
echo "##vso[task.setvariable variable=AR]ar"
2222
displayName: Prep
2323

.azure-pipelines/steps/run-script.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ steps:
55
date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
66
displayName: Log time information (before)
77

8-
- bash: |
8+
- bash: |
99
which sccache
1010
stamp sh -x -c "$RUN_SCRIPT"
1111
env:
@@ -15,8 +15,8 @@ steps:
1515

1616
# Explicitly decrypt secret variables
1717
# See https://docs.microsoft.com/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch#secret-variables
18-
SCCACHE_AZURE_CONNECTION_STRING: $(SCCACHE_AZURE_CONNECTION_STRING_SECRET)
19-
DOCKER_LAYER_CACHE_AZURE_STORAGE_ACCOUNT_KEY: $(DOCKER_LAYER_CACHE_AZURE_STORAGE_ACCOUNT_KEY_SECRET)
18+
AWS_ACCESS_KEY_ID: $(SCCACHE_AWS_ACCESS_KEY_ID)
19+
AWS_SECRET_ACCESS_KEY: $(SCCACHE_AWS_SECRET_ACCESS_KEY)
2020
displayName: Run script
2121

2222
- bash: |

.azure-pipelines/steps/windows.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ steps:
106106

107107
- script: |
108108
md sccache
109-
powershell -Command "iwr -outf sccache\sccache.exe https://rustlangtools.blob.core.windows.net/public/stable-x86_64-pc-windows-msvc.sccache.exe"
109+
powershell -Command "iwr -outf sccache\sccache.exe https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2018-04-26-sccache-x86_64-pc-windows-msvc"
110110
echo ##vso[task.prependpath]%CD%\sccache
111111
displayName: Download and install sccache
112112

@@ -155,6 +155,6 @@ steps:
155155

156156
# explicitly decrypt secret variables
157157
# see https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch
158-
SCCACHE_AZURE_CONNECTION_STRING: $(SCCACHE_AZURE_CONNECTION_STRING_SECRET)
159-
DOCKER_LAYER_CACHE_AZURE_STORAGE_ACCOUNT_KEY: $(DOCKER_LAYER_CACHE_AZURE_STORAGE_ACCOUNT_KEY_SECRET)
158+
AWS_ACCESS_KEY_ID: $(SCCACHE_AWS_ACCESS_KEY_ID)
159+
AWS_SECRET_ACCESS_KEY: $(SCCACHE_AWS_SECRET_ACCESS_KEY)
160160
displayName: Run script

src/ci/docker/run.sh

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/usr/bin/env bash
22

3-
# ignore-tidy-linelength
4-
53
set -e
64

75
export MSYS_NO_PATHCONV=1
@@ -43,21 +41,9 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
4341
cksum=$(sha512sum $hash_key | \
4442
awk '{print $1}')
4543

46-
if [ "$DOCKER_LAYER_CACHE_AZURE_STORAGE_ACCOUNT" != "" ]; then
47-
# install azcopy
48-
echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod/ xenial main" > azure.list
49-
sudo cp ./azure.list /etc/apt/sources.list.d/
50-
sudo apt-key adv --keyserver packages.microsoft.com --recv-keys EB3E94ADBE1229CF
51-
sudo apt-get update
52-
sudo apt-get install azcopy
53-
54-
url="https://$DOCKER_LAYER_CACHE_AZURE_STORAGE_ACCOUNT.blob.core.windows.net/$DOCKER_LAYER_CACHE_AZURE_STORAGE_CONTAINER/$cksum"
55-
upload="azcopy --quiet --destination $url --dest-key $DOCKER_LAYER_CACHE_AZURE_STORAGE_ACCOUNT_KEY"
56-
else
57-
s3url="s3://$SCCACHE_BUCKET/docker/$cksum"
58-
url="https://s3-us-west-1.amazonaws.com/$SCCACHE_BUCKET/docker/$cksum"
59-
upload="aws s3 cp - $s3url"
60-
fi
44+
s3url="s3://$SCCACHE_BUCKET/docker/$cksum"
45+
url="https://s3-us-west-1.amazonaws.com/$SCCACHE_BUCKET/docker/$cksum"
46+
upload="aws s3 cp - $s3url"
6147

6248
echo "Attempting to download $url"
6349
rm -f /tmp/rustci_docker_cache
@@ -134,9 +120,6 @@ if [ "$SCCACHE_BUCKET" != "" ]; then
134120
args="$args --env SCCACHE_REGION"
135121
args="$args --env AWS_ACCESS_KEY_ID"
136122
args="$args --env AWS_SECRET_ACCESS_KEY"
137-
elif [ "$SCCACHE_AZURE_CONNECTION_STRING" != "" ]; then
138-
args="$args --env SCCACHE_AZURE_CONNECTION_STRING"
139-
args="$args --env SCCACHE_AZURE_BLOB_CONTAINER"
140123
else
141124
mkdir -p $HOME/.cache/sccache
142125
args="$args --env SCCACHE_DIR=/sccache --volume $HOME/.cache/sccache:/sccache"

src/ci/docker/scripts/sccache.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
set -ex
22

3-
echo Use sccache built with Azure Storage support
43
curl -fo /usr/local/bin/sccache \
5-
https://rustlangtools.blob.core.windows.net/public/stable-x86_64-unknown-linux-musl.sccache
4+
https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2018-04-02-sccache-x86_64-unknown-linux-musl
65

76
chmod +x /usr/local/bin/sccache

0 commit comments

Comments
 (0)