0a5e58dacb
Included changes: *Update minimum Yarn version from 1.3.2 to 1.10.1* Yarn 1.10 added the integrity field to the lockfile, making newer Yarn users have their lockfile changed a lot if they run `yarn`. This commit updates the required Yarn version to be at least 1.10.1 and changes Travis & Jenkins to use Yarn 1.10.1 *Change the package.json's engines grunt field to grunt-cli* The grunt field suggested it's the grunt package version we're checking while we check the grunt-cli version instead. *Stop separating Yarn script arguments from script names via " -- "* The " -- " separator is necessary in npm but not in Yarn. In fact, it's deprecated in Yarn and some future version is supposed to start passing this parameter directly to the scripts which may break them. *Don't install grunt-cli globally during the build* It's enough to use `yarn grunt` instead of `grunt` and the global grunt-cli installation is no longer needed. *Use `yarn grunt` instead of `yarn run grunt`* The former form is shorter. *Don't define the `grunt` Yarn script* As opposed to npm, `yarn binName` invokes a binary named `binName` exposed by the respective package so the `grant` Yarn script is no longer needed. *Allow Node versions newer than 8; bump the minimum* Closes #16714
104 lines
3.6 KiB
YAML
104 lines
3.6 KiB
YAML
language: node_js
|
|
sudo: false
|
|
node_js:
|
|
- '8'
|
|
|
|
cache:
|
|
yarn: true
|
|
|
|
branches:
|
|
except:
|
|
- "/^g3_.*$/"
|
|
|
|
env:
|
|
matrix:
|
|
- JOB=ci-checks
|
|
- JOB=unit-core BROWSER_PROVIDER=saucelabs
|
|
- JOB=unit-jquery BROWSER_PROVIDER=saucelabs
|
|
- JOB=docs-app BROWSER_PROVIDER=saucelabs
|
|
- JOB=e2e TEST_TARGET=jqlite BROWSER_PROVIDER=saucelabs
|
|
- JOB=e2e TEST_TARGET=jquery BROWSER_PROVIDER=saucelabs
|
|
global:
|
|
- SAUCE_USERNAME=angular-ci
|
|
- SAUCE_ACCESS_KEY=9b988f434ff8-fbca-8aa4-4ae3-35442987
|
|
- LOGS_DIR=/tmp/angular-build/logs
|
|
- BROWSER_PROVIDER_READY_FILE=/tmp/browsersprovider-tunnel-ready
|
|
- secure: oTBjhnOKhs0qDSKTf7fE4f6DYiNDPycvB7qfSF5QRIbJK/LK/J4UtFwetXuXj79HhUZG9qnoT+5e7lPaiaMlpsIKn9ann7ffqFWN1E8TMtpJF+AGigx3djYElwfgf5nEnFUFhwjFzvbfpZNnxVGgX5YbIZpe/WUbHkP4ffU0Wks=
|
|
|
|
before_install:
|
|
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.10.1
|
|
- export PATH="$HOME/.yarn/bin:$PATH"
|
|
|
|
before_script:
|
|
- du -sh ./node_modules || true
|
|
- "./scripts/travis/before_build.sh"
|
|
script:
|
|
- "./scripts/travis/build.sh"
|
|
|
|
after_script:
|
|
- "./scripts/travis/tear_down_browser_provider.sh"
|
|
- "./scripts/travis/print_logs.sh"
|
|
|
|
notifications:
|
|
webhooks:
|
|
urls:
|
|
- https://webhooks.gitter.im/e/d2120f3f2bb39a4531b2
|
|
- http://104.197.9.155:8484/hubot/travis/activity #hubot-server
|
|
on_success: always # options: [always|never|change] default: always
|
|
on_failure: always # options: [always|never|change] default: always
|
|
on_start: always # default: false
|
|
|
|
jobs:
|
|
include:
|
|
- stage: deploy
|
|
# Don't deploy from PRs. Only deploy from our default branches, or if commit is tagged.
|
|
# This is a Travis-specific boolean language: https://docs.travis-ci.com/user/conditional-builds-stages-jobs#Specifying-conditions
|
|
# The deployment logic for pushed branches is further defined in scripts\travis\build.sh
|
|
if: type != pull_request and (branch =~ ^(v1\.\d+\.x|master)$ or tag IS present)
|
|
env:
|
|
- JOB=deploy
|
|
before_script: skip
|
|
script:
|
|
# Export the variables into the current process
|
|
- . ./scripts/travis/build.sh
|
|
- "echo DEPLOY_DOCS: $DEPLOY_DOCS, DEPLOY_CODE: $DEPLOY_CODE"
|
|
after_script: skip
|
|
# Work around the 10min Travis timeout so the code.angularjs firebase+gcs code deploy can complete
|
|
# Only run the keep_alive once (before_deploy is run for each provider)
|
|
before_deploy: |
|
|
if ! [ "$BEFORE_DEPLOY_RUN" ]; then
|
|
export BEFORE_DEPLOY_RUN=1;
|
|
|
|
function keep_alive() {
|
|
while true; do
|
|
echo -en "\a"
|
|
sleep 10
|
|
done
|
|
}
|
|
keep_alive &
|
|
fi
|
|
deploy:
|
|
- provider: firebase
|
|
# the upload folder for firebase is configured in /firebase.json
|
|
skip_cleanup: true
|
|
project: docs-angularjs-org-9p2
|
|
token:
|
|
secure: $FIREBASE_TOKEN
|
|
on:
|
|
repo: angular/angular.js
|
|
all_branches: true
|
|
condition: "$DEPLOY_DOCS == true"
|
|
- provider: gcs
|
|
skip_cleanup: true
|
|
access_key_id: GOOGLDB7W2J3LFHICF3R
|
|
secret_access_key:
|
|
secure: tHIFdSq55qkyZf9zT/3+VkhUrTvOTMuswxXU3KyWaBrSieZqG0UnUDyNm+n3lSfX95zEl/+rJAWbfvhVSxZi13ndOtvRF+MdI1cvow2JynP0aDSiPffEvVrZOmihD6mt2SlMfhskr5FTduQ69kZG6DfLcve1PPDaIwnbOv3phb8=
|
|
bucket: code-angularjs-org-338b8.appspot.com
|
|
local-dir: deploy/code
|
|
detect_encoding: true # detects gzip compression
|
|
on:
|
|
repo: angular/angular.js
|
|
all_branches: true
|
|
condition: "$DEPLOY_CODE == true"
|
|
|