Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Merge pull request #865 from LiskHQ/864-cache-node-modules
Browse files Browse the repository at this point in the history
Cache node_modules - Closes #864
  • Loading branch information
fchavant authored Oct 13, 2017
2 parents 845ffff + 1bb8e05 commit 81108dc
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,15 @@ node('lisk-nano') {

stage ('Install npm dependencies') {
try {
sh 'npm install'
sh '''
cp -r ~/cache/development/node_modules ./ || true
npm install
./node_modules/protractor/bin/webdriver-manager update
# cache nightly builds (development) only to save space
if [ $BRANCH_NAME = "development" ]; then
rsync -axl --delete $WORKSPACE/node_modules/ ~/cache/development/node_modules/ || true
fi
'''
} catch (err) {
echo "Error: ${err}"
fail('Stopping build: npm install failed')
Expand Down Expand Up @@ -110,7 +118,6 @@ node('lisk-nano') {
# End to End test configuration
export DISPLAY=:1$N
Xvfb :1$N -ac -screen 0 1280x1024x24 &
./node_modules/protractor/bin/webdriver-manager update
# Run end-to-end tests
npm run --silent e2e-test -- --params.baseURL http://localhost:808$N/ --params.liskCoreURL http://localhost:400$N
Expand Down

0 comments on commit 81108dc

Please sign in to comment.