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 6, 2017
1 parent 409de73 commit 7fff1e4
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 @@ -56,10 +56,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 @@ -143,6 +139,11 @@ node('lisk-nano') {
( cd ~/lisk-Linux-x86_64 && bash lisk.sh stop_node -p etc/pm2-lisk_$N.json ) || true
pgrep --list-full -f "Xvfb :1$N" || true
pkill --echo -f "Xvfb :1$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 7fff1e4

Please sign in to comment.