Skip to content

Commit d52d9c2

Browse files
committed
Auto merge of #55304 - alexcrichton:update-credentials, r=kennytm
ci: Move global credentials to web configuration This commit moves a number of our encrypted credentials stored in configuration files in this repository to env vars on the web UI. This will hopefully make it easier to rotate credentials in the future as well as quickly change them if the need arises. (quicker than landing a PR that is). This also updates the travis deployment process to always use the `aws` command line tool which we're already installing on Linux and should enable us to avoid all `dpl` gem issues as well as have greater control over what's going where.
2 parents e8aef7c + 3c25f80 commit d52d9c2

File tree

2 files changed

+24
-105
lines changed

2 files changed

+24
-105
lines changed

.travis.yml

+20-90
Original file line numberDiff line numberDiff line change
@@ -197,23 +197,10 @@ matrix:
197197
. src/ci/docker/x86_64-gnu-tools/repo.sh;
198198
commit_toolstate_change "$MESSAGE_FILE" "$TRAVIS_BUILD_DIR/src/tools/publish_toolstate.py" "$(git rev-parse HEAD)" "$(git log --format=%s -n1 HEAD)" "$MESSAGE_FILE" "$TOOLSTATE_REPO_ACCESS_TOKEN";
199199

200-
env:
201-
global:
202-
- SCCACHE_BUCKET=rust-lang-ci-sccache2
203-
- SCCACHE_REGION=us-west-1
204-
- AWS_ACCESS_KEY_ID=AKIAJAMV3QAMMA6AXHFQ
205-
# AWS_SECRET_ACCESS_KEY=...
206-
- secure: "j96XxTVOSUf4s4r4htIxn/fvIa5DWbMgLqWl7r8z2QfgUwscmkMXAwXuFNc7s7bGTpV/+CgDiMFFM6BAFLGKutytIF6oA02s9b+usQYnM0th7YQ2AIgm9GtMTJCJp4AoyfFmh8F2faUICBZlfVLUJ34udHEe35vOklix+0k4WDo="
207-
# TOOLSTATE_REPO_ACCESS_TOKEN=...
208-
- secure: "ESfcXqv4N2VMhqi2iIyw6da9VrsA78I4iR1asouCaq4hzTTrkB4WNRrfURy6xg72gQ4nMhtRJbB0/2jmc9Cu1+g2CzXtyiL223aJ5CKrXdcvbitopQSDfp07dMWm+UED+hNFEanpErKAeU/6FM3A+J+60PMk8MCF1h9tqNRISJw="
209-
210200
before_install:
211-
# We'll use the AWS cli to download/upload cached docker layers, so install
212-
# that here.
213-
- if [ "$TRAVIS_OS_NAME" = linux ]; then
214-
pip install --user awscli;
215-
export PATH=$PATH:$HOME/.local/bin;
216-
fi
201+
# We'll use the AWS cli to download/upload cached docker layers as well as
202+
# push our deployments, so download that here.
203+
- pip install --user awscli; export PATH=$PATH:$HOME/.local/bin
217204
- mkdir -p $HOME/rustsrc
218205
# FIXME(#46924): these two commands are required to enable IPv6,
219206
# they shouldn't exist, please revert once more official solutions appeared.
@@ -276,6 +263,23 @@ after_success:
276263
echo "#### Build successful; Disk usage after running script:";
277264
df -h;
278265
du . | sort -nr | head -n100
266+
- >
267+
if [ "$DEPLOY$DEPLOY_ALT" == "1" ]; then
268+
mkdir -p deploy/$TRAVIS_COMMIT;
269+
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
270+
rm -rf build/dist/doc &&
271+
cp -r build/dist/* deploy/$TRAVIS_COMMIT;
272+
else
273+
rm -rf obj/build/dist/doc &&
274+
cp -r obj/build/dist/* deploy/$TRAVIS_COMMIT;
275+
fi;
276+
ls -la deploy/$TRAVIS_COMMIT;
277+
deploy_dir=rustc-builds;
278+
if [ "$DEPLOY_ALT" == "1" ]; then
279+
deploy_dir=rustc-builds-alt;
280+
fi;
281+
travis_retry aws s3 cp --no-progress --recursive --acl public-read ./deploy s3://rust-lang-ci2/$deploy_dir
282+
fi
279283
280284
after_failure:
281285
- >
@@ -322,77 +326,3 @@ after_failure:
322326

323327
notifications:
324328
email: false
325-
326-
before_deploy:
327-
- mkdir -p deploy/$TRAVIS_COMMIT
328-
- >
329-
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
330-
rm -rf build/dist/doc &&
331-
cp -r build/dist/* deploy/$TRAVIS_COMMIT;
332-
else
333-
rm -rf obj/build/dist/doc &&
334-
cp -r obj/build/dist/* deploy/$TRAVIS_COMMIT;
335-
fi
336-
- ls -la deploy/$TRAVIS_COMMIT
337-
338-
deploy:
339-
- provider: s3
340-
bucket: rust-lang-ci2
341-
skip_cleanup: true
342-
local_dir: deploy
343-
upload_dir: rustc-builds
344-
acl: public_read
345-
region: us-west-1
346-
access_key_id: AKIAJVBODR3IA4O72THQ
347-
secret_access_key:
348-
secure: "kUGd3t7JcVWFESgIlzvsM8viZgCA9Encs3creW0xLJaLSeI1iVjlJK4h/2/nO6y224AFrh/GUfsNr4/4AlxPuYb8OU5oC5Lv+Ff2JiRDYtuNpyQSKAQp+bRYytWMtrmhja91h118Mbm90cUfcLPwkdiINgJNTXhPKg5Cqu3VYn0="
349-
on:
350-
branch: auto
351-
condition: $DEPLOY = 1
352-
353-
# this is the same as the above deployment provider except that it uploads to
354-
# a slightly different directory and has a different trigger
355-
- provider: s3
356-
bucket: rust-lang-ci2
357-
skip_cleanup: true
358-
local_dir: deploy
359-
upload_dir: rustc-builds-alt
360-
acl: public_read
361-
region: us-west-1
362-
access_key_id: AKIAJVBODR3IA4O72THQ
363-
secret_access_key:
364-
secure: "kUGd3t7JcVWFESgIlzvsM8viZgCA9Encs3creW0xLJaLSeI1iVjlJK4h/2/nO6y224AFrh/GUfsNr4/4AlxPuYb8OU5oC5Lv+Ff2JiRDYtuNpyQSKAQp+bRYytWMtrmhja91h118Mbm90cUfcLPwkdiINgJNTXhPKg5Cqu3VYn0="
365-
on:
366-
branch: auto
367-
condition: $DEPLOY_ALT = 1
368-
369-
# These two providers are the same as the two above, except deploy on the
370-
# try branch. Travis does not appear to provide a way to use "or" in these
371-
# conditions.
372-
- provider: s3
373-
bucket: rust-lang-ci2
374-
skip_cleanup: true
375-
local_dir: deploy
376-
upload_dir: rustc-builds
377-
acl: public_read
378-
region: us-west-1
379-
access_key_id: AKIAJVBODR3IA4O72THQ
380-
secret_access_key:
381-
secure: "kUGd3t7JcVWFESgIlzvsM8viZgCA9Encs3creW0xLJaLSeI1iVjlJK4h/2/nO6y224AFrh/GUfsNr4/4AlxPuYb8OU5oC5Lv+Ff2JiRDYtuNpyQSKAQp+bRYytWMtrmhja91h118Mbm90cUfcLPwkdiINgJNTXhPKg5Cqu3VYn0="
382-
on:
383-
branch: try
384-
condition: $DEPLOY = 1
385-
386-
- provider: s3
387-
bucket: rust-lang-ci2
388-
skip_cleanup: true
389-
local_dir: deploy
390-
upload_dir: rustc-builds-alt
391-
acl: public_read
392-
region: us-west-1
393-
access_key_id: AKIAJVBODR3IA4O72THQ
394-
secret_access_key:
395-
secure: "kUGd3t7JcVWFESgIlzvsM8viZgCA9Encs3creW0xLJaLSeI1iVjlJK4h/2/nO6y224AFrh/GUfsNr4/4AlxPuYb8OU5oC5Lv+Ff2JiRDYtuNpyQSKAQp+bRYytWMtrmhja91h118Mbm90cUfcLPwkdiINgJNTXhPKg5Cqu3VYn0="
396-
on:
397-
branch: try
398-
condition: $DEPLOY_ALT = 1

appveyor.yml

+4-15
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
environment:
2-
SCCACHE_BUCKET: rust-lang-ci-sccache2
3-
SCCACHE_REGION: us-west-1
4-
AWS_ACCESS_KEY_ID: AKIAJAMV3QAMMA6AXHFQ
5-
AWS_SECRET_ACCESS_KEY:
6-
secure: 7Y+JiquYedOAgnUU26uL0DPzrxmTtR+qIwG6rNKSuWDffqU3vVZxbGXim9QpTO80
72
SCCACHE_DIGEST: f808afabb4a4eb1d7112bcb3fa6be03b61e93412890c88e177c667eb37f46353d7ec294e559b16f9f4b5e894f2185fe7670a0df15fd064889ecbd80f0c34166c
8-
TOOLSTATE_REPO_ACCESS_TOKEN:
9-
secure: gKGlVktr7iuqCoYSxHxDE9ltLOKU0nYDEuQxvWbNxUIW7ri5ppn8L06jQzN0GGzN
103

114
# By default schannel checks revocation of certificates unlike some other SSL
125
# backends, but we've historically had problems on CI where a revocation
@@ -235,10 +228,8 @@ before_deploy:
235228
236229
deploy:
237230
- provider: S3
238-
skip_cleanup: true
239-
access_key_id: AKIAJVBODR3IA4O72THQ
240-
secret_access_key:
241-
secure: tQWIE+DJHjXaV4np/3YeETkEmXngtIuIgAO/LYKQaUshGLgN8cBCFGG3cHx5lKLt
231+
access_key_id: $(AWS_ACCESS_KEY_ID)
232+
secret_access_key: $(AWS_SECRET_ACCESS_KEY)
242233
bucket: rust-lang-ci2
243234
set_public: true
244235
region: us-west-1
@@ -252,10 +243,8 @@ deploy:
252243
# This provider is the same as the one above except that it has a slightly
253244
# different upload directory and a slightly different trigger
254245
- provider: S3
255-
skip_cleanup: true
256-
access_key_id: AKIAJVBODR3IA4O72THQ
257-
secret_access_key:
258-
secure: tQWIE+DJHjXaV4np/3YeETkEmXngtIuIgAO/LYKQaUshGLgN8cBCFGG3cHx5lKLt
246+
access_key_id: $(AWS_ACCESS_KEY_ID)
247+
secret_access_key: $(AWS_SECRET_ACCESS_KEY)
259248
bucket: rust-lang-ci2
260249
set_public: true
261250
region: us-west-1

0 commit comments

Comments
 (0)