NPM Jobs now run on Xenial

This updates the our javascript builds to run on xenial.

Change-Id: I8b0c78b28cf04607862e2882fb0fcdec816c5b81
This commit is contained in:
Michael Krotscheck 2016-05-04 13:52:52 -07:00
parent 776341feaf
commit 8f9ef6c442
No known key found for this signature in database
GPG Key ID: 20E618D878DE38AB
2 changed files with 16 additions and 11 deletions

View File

@ -6,7 +6,7 @@
# gerrit).
- job-template:
name: 'gate-{name}-npm-run-{command}'
node: ubuntu-trusty
node: ubuntu-xenial
wrappers:
- build-timeout:
@ -45,7 +45,7 @@
# Builds and uploads a tarball using NPM.
- job-template:
name: '{name}-npm-publish-tarball'
node: ubuntu-trusty
node: ubuntu-xenial
builders:
- print-template-name:
@ -84,7 +84,7 @@
# Builds and uploads a draft version of the project to docs-draft.
- job-template:
name: '{name}-npm-publish-draft'
node: ubuntu-trusty
node: ubuntu-xenial
builders:
- print-template-name:
@ -133,7 +133,7 @@
# your Gruntfile must declare a target named "build:draft"
- job-template:
name: 'gate-{name}-js-draft'
node: ubuntu-trusty
node: ubuntu-xenial
wrappers:
- build-timeout:
@ -174,7 +174,7 @@
# Builds a release tarball
- job-template:
name: '{name}-js-release-{job-suffix}'
node: ubuntu-trusty
node: ubuntu-xenial
builders:
- print-template-name:

View File

@ -230,14 +230,19 @@
sudo apt-get update
sudo apt-get install -y apt-transport-https lsb-release curl
# Install the APT Key
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | sudo apt-key add -
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
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
sudo apt-get update
sudo apt-get install -y nodejs
sudo apt-get update
sudo apt-get install -y nodejs
elif [[ ${DISTRO} == "xenial" ]]; then
sudo apt-get install -y nodejs nodejs-legacy npm
fi
# Output to the log for debugging's sake.
node --version