From 50e68abc4ab0492c60de61c791294928bd30c952 Mon Sep 17 00:00:00 2001 From: Michael Krotscheck Date: Wed, 6 Jul 2016 20:26:32 +0100 Subject: [PATCH] Always install nodejs from nodesource It appears that the xenial LTS packages are not staying up-to-date with the latest LTS releases of NodeJS and NPM. This patch removes the distro condition that toggles installs, instead relying on the upstream package we use from NodeSource directly. Change-Id: I273ebcf85f8fcb09938149a2e30e22fbbbd96dd5 --- jenkins/jobs/macros.yaml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/jenkins/jobs/macros.yaml b/jenkins/jobs/macros.yaml index bba0a92760..02e2d0e130 100644 --- a/jenkins/jobs/macros.yaml +++ b/jenkins/jobs/macros.yaml @@ -231,18 +231,15 @@ sudo apt-get install -y apt-transport-https lsb-release curl DISTRO=$(lsb_release -c -s) - if [[ ${DISTRO} == "trusty" ]]; then - # Install via nodesource - curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add - - echo 'deb https://deb.nodesource.com/node_4.x trusty main' | sudo tee /etc/apt/sources.list.d/nodesource.list - echo 'deb-src https://deb.nodesource.com/node_4.x trusty main' | sudo tee -a /etc/apt/sources.list.d/nodesource.list + # Install via nodesource + curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add - - sudo apt-get update - sudo apt-get install -y nodejs - elif [[ ${DISTRO} == "xenial" ]]; then - sudo apt-get install -y nodejs nodejs-legacy npm - fi + echo "deb https://deb.nodesource.com/node_4.x $DISTRO main" | sudo tee /etc/apt/sources.list.d/nodesource.list + echo "deb-src https://deb.nodesource.com/node_4.x $DISTRO main" | sudo tee -a /etc/apt/sources.list.d/nodesource.list + + sudo apt-get update + sudo apt-get install -y nodejs # Output to the log for debugging's sake. node --version