angular-docs-cn/.travis.yml
Alex Eagle 4572157c49 chore(build): add GCS upload of build artifacts
This copies the dist/ folder for each successful travis run
to a google cloud storage bucket, under the SHA of the commit.
We only upload for submitted changes, not PRs.
We can use this to fetch the dart sources for each SHA
without having to re-build them, which is hard to reproduce
since the environment might differ (eg. different Dart SDK)
2015-07-08 16:25:03 -07:00

93 lines
2.8 KiB
YAML

language: node_js
sudo: false
node_js:
- '0.12'
cache:
directories:
- node_modules
- $HOME/.pub-cache
env:
global:
- KARMA_BROWSERS=DartiumWithWebPlatform
- E2E_BROWSERS=Dartium
- LOGS_DIR=/tmp/angular-build/logs
- ARCH=linux-x64
# Token for tsd to increase github rate limit
# See https://github.com/DefinitelyTyped/tsd#tsdrc
# This does not use http://docs.travis-ci.com/user/environment-variables/#Secure-Variables
# because those are not visible for pull requests, and those should also be reliable.
# This SSO token belongs to github account angular-github-ratelimit-token which has no access
# (password is in Valentine)
- TSDRC='{"token":"ef474500309daea53d5991b3079159a29520a40b"}'
matrix:
- MODE=js DART_CHANNEL=dev
- MODE=dart DART_CHANNEL=stable
- MODE=dart DART_CHANNEL=dev
addons:
firefox: "38.0"
before_install:
- echo ${TSDRC} > .tsdrc
- export DISPLAY=:99.0
- export GIT_SHA=$(git rev-parse HEAD)
- ./scripts/ci/init_android.sh
- ./scripts/ci/install_dart.sh ${DART_CHANNEL} ${ARCH}
- sh -e /etc/init.d/xvfb start
- if [[ -e SKIP_TRAVIS_TESTS ]]; then { cat SKIP_TRAVIS_TESTS ; exit 0; } fi
install:
# Update npm
- npm install -g npm@2.9.1
- npm --version
# Check the size of caches
- du -sh ./node_modules || true
# Install npm dependecies
- npm install
before_script:
- mkdir -p $LOGS_DIR
script:
- ./scripts/ci/build_and_test.sh ${MODE}
after_script:
- ./scripts/ci/print-logs.sh
notifications:
webhooks:
urls:
- https://webhooks.gitter.im/e/1ef62e23078036f9cee4
on_success: change # options: [always|never|change] default: always
on_failure: always # options: [always|never|change] default: always
on_start: false # default: false
slack:
secure: EP4MzZ8JMyNQJ4S3cd5LEPWSMjC7ZRdzt3veelDiOeorJ6GwZfCDHncR+4BahDzQAuqyE/yNpZqaLbwRWloDi15qIUsm09vgl/1IyNky1Sqc6lEknhzIXpWSalo4/T9ZP8w870EoDvM/UO+LCV99R3wS8Nm9o99eLoWVb2HIUu0=
deploy:
- provider: gcs
access_key_id: GOOGIOQTDBEOPBUAWFZQ
secret_access_key:
secure: "rsx0rvLAGWV47rmgJC2CJUmtFtj9TbbvGUGj8b8ykLuhu3LlMMgTpgxj7YNJ0j6HM3UZ9tubNuK0jqNW3eWul9AzNAz4zMvHpUmn852gIIOFKdYhCaB5PGL58QbqeP48B2VyDYqDWaQGH8ClfZYPrTb6XnhVTrZVHba5x9DqHwc="
bucket: angular2-snapshots
skip_cleanup: true
local-dir: dist
upload-dir: $TRAVIS_COMMIT/dart_stable
on:
repo: angular/angular
condition: $MODE=dart
condition: $DART_CHANNEL=stable
- provider: gcs
access_key_id: GOOGIOQTDBEOPBUAWFZQ
secret_access_key:
secure: "rsx0rvLAGWV47rmgJC2CJUmtFtj9TbbvGUGj8b8ykLuhu3LlMMgTpgxj7YNJ0j6HM3UZ9tubNuK0jqNW3eWul9AzNAz4zMvHpUmn852gIIOFKdYhCaB5PGL58QbqeP48B2VyDYqDWaQGH8ClfZYPrTb6XnhVTrZVHba5x9DqHwc="
bucket: angular2-snapshots
skip_cleanup: true
local-dir: dist
upload-dir: $TRAVIS_COMMIT/js
on:
repo: angular/angular
condition: $MODE=js