about summary refs log tree commit diff
path: root/src/ci/docker/scripts/android-sdk-manager.py
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-08-14 04:18:43 +0200
committerGitHub <noreply@github.com>2019-08-14 04:18:43 +0200
commit6092519e44a09cbac73fb6aa263879f9890b7b8a (patch)
tree7522389df30c0bb8250b9cd50d9be2dab7136167 /src/ci/docker/scripts/android-sdk-manager.py
parentc8248394715ae4a6c88ee14b10ad526a54259520 (diff)
parenteb832b2a3244166c81d8e00d94805525f3bd7526 (diff)
downloadrust-6092519e44a09cbac73fb6aa263879f9890b7b8a.tar.gz
rust-6092519e44a09cbac73fb6aa263879f9890b7b8a.zip
Rollup merge of #63485 - pietroalbini:new-mirror-bucket, r=alexcrichton
ci: move mirrors to their standalone bucket

Currently mirrors are stored in the rust-lang-ci2 S3 bucket along with
CI toolchains. This is problematic for multiple reasons:

- CI IAM credentials are allowed to both edit and delete those files.
  A malicious user gaining access to those credentials would be able to
  change our mirrored dependencies, possibly compromising the compiler.

- Contents of the rust-lang-ci2 bucket are disposable except for the
  mirrors' content. When we implement backups for S3 buckets we'd have
  to replicate just that part of the bucket, complicating the backup
  logic and increasing the chance of mistakes. A standalone bucket will
  be way easier to backup.

This commit switches our CI to use the new rust-lang-ci-mirrors bucket.

r? @alexcrichton
Diffstat (limited to 'src/ci/docker/scripts/android-sdk-manager.py')
-rwxr-xr-xsrc/ci/docker/scripts/android-sdk-manager.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ci/docker/scripts/android-sdk-manager.py b/src/ci/docker/scripts/android-sdk-manager.py
index 7c9a8b82e92..c9e2961f6eb 100755
--- a/src/ci/docker/scripts/android-sdk-manager.py
+++ b/src/ci/docker/scripts/android-sdk-manager.py
@@ -23,8 +23,9 @@ REPOSITORIES = [
 HOST_OS = "linux"
 
 # Mirroring options
-MIRROR_BUCKET = "rust-lang-ci2"
-MIRROR_BASE_DIR = "rust-ci-mirror/android/"
+MIRROR_BUCKET = "rust-lang-ci-mirrors"
+MIRROR_BUCKET_REGION = "us-west-1"
+MIRROR_BASE_DIR = "rustc/android/"
 
 import argparse
 import hashlib
@@ -144,7 +145,8 @@ def cli_install(args):
     lockfile = Lockfile(args.lockfile)
     for package in lockfile.packages.values():
         # Download the file from the mirror into a temp file
-        url = "https://" + MIRROR_BUCKET + ".s3.amazonaws.com/" + MIRROR_BASE_DIR
+        url = "https://" + MIRROR_BUCKET + ".s3-" + MIRROR_BUCKET_REGION + \
+              ".amazonaws.com/" + MIRROR_BASE_DIR
         downloaded = package.download(url)
         # Extract the file in a temporary directory
         extract_dir = tempfile.mkdtemp()