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

Commit

Permalink
Move nightly build cache to end of Jenkinsfile
Browse files Browse the repository at this point in the history
... so that HardSourceWebpackPlugin cache is also saved
  • Loading branch information
slaweet committed Nov 4, 2017
1 parent 907a51b commit 7ab22c7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ node('lisk-nano') {
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}"
Expand Down Expand Up @@ -145,6 +141,11 @@ node('lisk-nano') {
pkill --echo -f "Xvfb :1$N" -9 || echo "pkill returned code $?"
pgrep --list-full -f "webpack.*808$N" || true
pkill --echo -f "webpack.*808$N" -9 || echo "pkill returned code $?"
# 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
'''
dir('node_modules') {
deleteDir()
Expand Down

0 comments on commit 7ab22c7

Please sign in to comment.