Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit acfc53b

Browse files
committed
chore(yarn): rely on Travis built-in Yarn support, update Yarn in Jenkins
On Travis we now rely on built-in Yarn support and we only cache the Yarn cache, not node_modules. This creates a more stable environment as we don't install over previous node_modules state but we still won't download packages from the internet in the second run for the same yarn.lock as Yarn takes packages from its local cache if they exist there. We install a new Yarn verison manually on Jenkins; the location of the install script changed.
1 parent 60644d5 commit acfc53b

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

.travis.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ node_js:
44
- '6'
55

66
cache:
7+
yarn: true
78
directories:
8-
- node_modules
99
- bower_components
1010

1111
branches:
@@ -35,10 +35,6 @@ addons:
3535
packages:
3636
- g++-4.8
3737

38-
before_install:
39-
- curl -o- -L https://raw.githubusercontent.com/yarnpkg/yarn/2a0afc73210c7a82082585283e518eeb88ca19ae/scripts/install-latest.sh | bash -s -- --version 0.17.9
40-
- export PATH=$HOME/.yarn/bin:$PATH
41-
4238
before_script:
4339
- du -sh ./node_modules ./bower_components/ || true
4440
- ./scripts/travis/before_build.sh

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"engines": {
1212
"node": "^6.9.1",
13-
"yarn": ">=0.17.9",
13+
"yarn": ">=0.21.3",
1414
"grunt": "^1.2.0"
1515
},
1616
"scripts": {

scripts/jenkins/init-node.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ nvm install
88

99
# clean out and install yarn
1010
rm -rf ~/.yarn
11-
curl -o- -L https://raw.githubusercontent.com/yarnpkg/yarn/2a0afc73210c7a82082585283e518eeb88ca19ae/scripts/install-latest.sh | bash -s -- --version 0.17.9
11+
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 0.21.3
1212
export PATH="$HOME/.yarn/bin:$PATH"
1313

1414
# Ensure that we have the local dependencies installed

0 commit comments

Comments
 (0)