Skip to content

Commit fe49a7f

Browse files
committed
chore(build): upload dart artifacts to GCS
second attempt after rollback of angular#2946 After each successful build in the dart stable variant, this uploads just enough of the dart artifacts to mirror what we would push to pub. By uploading the files instead of a zip, this lets dart users depend on an unreleased snapshot of angular2, and lets us easily fetch the dart artifacts for sync into google3 without having to re-build (potentially in a subtly different environment). This doesn't upload anything for pull requests.
1 parent 447926d commit fe49a7f

2 files changed

Lines changed: 24 additions & 0 deletions

File tree

.travis.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,26 @@ notifications:
6666
slack:
6767
secure: EP4MzZ8JMyNQJ4S3cd5LEPWSMjC7ZRdzt3veelDiOeorJ6GwZfCDHncR+4BahDzQAuqyE/yNpZqaLbwRWloDi15qIUsm09vgl/1IyNky1Sqc6lEknhzIXpWSalo4/T9ZP8w870EoDvM/UO+LCV99R3wS8Nm9o99eLoWVb2HIUu0=
6868

69+
deploy:
70+
- provider: gcs
71+
# This is for project angular-github-babysitter
72+
access_key_id: GOOGIOQTDBEOPBUAWFZQ
73+
secret_access_key:
74+
secure: "MEDggllZ5fw4wI9CEUi8WR6jKsKXqdRF/DLxSNC2JpzM5RlVeBm0uqjntYT1Cf1dASvQ2/+vZCUikL/3A48NcoEYRHXGmxu8D6t/SvleQD8Xv434xFOdsa2QqP/HiCtqCLOI5jJz1JVoB5nNyKKZ33ogTUL1LV1TfcrAioyizW8="
75+
# this bucket has a lifecycle to delete after 90 days:
76+
# $ echo '{"rule": [{"action": {"type": "Delete"}, "condition": {"age": 90}}]}' > lifecycle.json
77+
# $ gsutil lifecycle set lifecycle.json gs://angular2-snapshots
78+
bucket: angular2-snapshots
79+
# don't delete generated files
80+
skip_cleanup: true
81+
# serve to public at https://storage.googleapis.com/angular2-snapshots/SHA/dart_stable/dist.tgz
82+
acl: public-read
83+
# upload the .tgz archive created in scripts/ci/build_and_test.sh
84+
local-dir: deploy
85+
# create a "subdirectory" for each commit
86+
upload-dir: $TRAVIS_COMMIT/dart_stable
87+
on:
88+
branch: master
89+
repo: angular/angular
90+
condition: "$MODE = dart && $DART_CHANNEL = stable"
91+

scripts/ci/build_and_test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ SCRIPT_DIR=$(dirname $0)
99
cd $SCRIPT_DIR/../..
1010

1111
${SCRIPT_DIR}/build_$MODE.sh
12+
mkdir deploy; tar -czpf deploy/dist.tgz -C dist .
1213
${SCRIPT_DIR}/test_$MODE.sh

0 commit comments

Comments
 (0)