From ae144196be608d609bd362be820f074441cfb775 Mon Sep 17 00:00:00 2001 From: Peter Bacon Darwin Date: Thu, 17 Dec 2015 11:45:37 +0000 Subject: [PATCH] chore(jenkins): run Jenkins builds on Node 4 (via nvm) --- scripts/jenkins/build.sh | 3 +++ scripts/jenkins/master.sh | 9 +-------- scripts/jenkins/release.sh | 2 ++ scripts/jenkins/set-node-version.sh | 7 +++++++ 4 files changed, 13 insertions(+), 8 deletions(-) create mode 100755 scripts/jenkins/set-node-version.sh diff --git a/scripts/jenkins/build.sh b/scripts/jenkins/build.sh index ea94a9d1a873..4b34eb30884e 100755 --- a/scripts/jenkins/build.sh +++ b/scripts/jenkins/build.sh @@ -7,6 +7,8 @@ echo "#################################" # Enable tracing and exit on first failure set -xe +scripts/jenkins/set-node-version.sh + # This is the default set of browsers to use on the CI server unless overridden via env variable if [[ -z "$BROWSERS" ]] then @@ -19,6 +21,7 @@ rm -f angular.js.size # BUILD # +npm install -g grunt-cli npm install --color false grunt ci-checks package --no-color diff --git a/scripts/jenkins/master.sh b/scripts/jenkins/master.sh index 06a9af367450..e123a02308f3 100755 --- a/scripts/jenkins/master.sh +++ b/scripts/jenkins/master.sh @@ -17,14 +17,7 @@ function init { function build { cd ../.. - - if [[ $NO_TEST == "true" ]]; then - npm install --color false - grunt ci-checks package --no-color - else - scripts/jenkins/build.sh - fi - + scripts/jenkins/build.sh cd $SCRIPT_DIR } diff --git a/scripts/jenkins/release.sh b/scripts/jenkins/release.sh index d8d21f8a407b..b90ac1454400 100755 --- a/scripts/jenkins/release.sh +++ b/scripts/jenkins/release.sh @@ -35,8 +35,10 @@ function init { } function build { + ./set-node-version.sh cd ../.. + npm install -g grunt-cli npm install --color false grunt ci-checks package --no-color diff --git a/scripts/jenkins/set-node-version.sh b/scripts/jenkins/set-node-version.sh new file mode 100755 index 000000000000..2f7c86e65f97 --- /dev/null +++ b/scripts/jenkins/set-node-version.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# Install nvm for this shell +source ~/.nvm/nvm.sh + +# Use node.js at 4.2.x +nvm install 4.2