IBM Support

How do you use a different node version in IBM DevOps Delivery Pipeline?

Question & Answer


Question

How do you use a different node version in IBM DevOps Delivery Pipeline?

Answer

Answer

To configure your build job, select npm as the Builder Type. Use the following shell snippet to set up your desired node version with the help of NVM:

#!/bin/bash export NVM_DIR=/home/pipeline/nvm export NODE_VERSION=<red>Node.js version you would like to install</red> export NVM_VERSION=v0.33.11

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


Screen capture of NODE_VERSION setting

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSCL32","label":"IBM Cloud Continuous Delivery"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB21","label":"Public Cloud Platform"}}]

Document Information

More support for:
IBM Cloud Continuous Delivery

Software version:
All Versions

Document number:
963570

Modified date:
05 August 2019

UID

ibm1KB0011085

Manage My Notification Subscriptions