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

Commit

Permalink
Cache node_modules in Jenkinsfile
Browse files Browse the repository at this point in the history
...to speed up Jenkins build
  • Loading branch information
slaweet committed Oct 12, 2017
1 parent 8bc1ac2 commit fcf018b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ node('lisk-nano') {

stage ('Install npm dependencies') {
try {
sh 'npm install'
sh '''
npm install npm-cache
./node_modules/npm-cache/index.js install npm
'''
} catch (err) {
echo "Error: ${err}"
fail('Stopping build: npm install failed')
Expand Down

0 comments on commit fcf018b

Please sign in to comment.