How to use a current Node version on IBM DevOps Delivery Pipeline

Posted on June 02, 2016

The Delivery Pipeline on IBM DevOps services let's you automate builds and deployments to IBM Bluemix in a very easy way. Unfortunately its pre-installed Node versions are not up to date and you may need a newer version to build your project.

To configure your Build Job select npm as Builder Type and use the following shell snippet to easily set up your desired Node version with the help of NVM.

export NVM_DIR=/home/pipeline/nvm
export NODE_VERSION=5.10.1
export NVM_VERSION=0.29.0

npm config delete prefix \
  && curl${NVM_VERSION}/ | sh \
  && . $NVM_DIR/ \
  && nvm install $NODE_VERSION \
  && nvm alias default $NODE_VERSION \
  && nvm use default \
  && node -v \
  && npm -v

npm install
# Further steps ...

Just adjust the versions in the exported environment variables in the beginning and you're done.

Build Job configuration

Michael Wellner

by Michael Wellner

Merzig, Saarland