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

Cache node_modules - Closes #864 #865

Merged
merged 3 commits into from
Oct 13, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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