Install a new NodeJS version

Issue

  • NodeJS is not available during a build

Environment

Resolution

  • Install Custom Tools Plugin
  • Under Manage Jenkins > Global Tool Configuration create a new Custom Tools installation
  • Set tool name to NodeJS 0.11.12
  • Use the following script as Shell installer:
curl -s -o use-node https://repository-cloudbees.forge.cloudbees.com/distributions/ci-addons/node/use-node
NODE_VERSION=0.11.12 . ./use-node
  • Enter this in tool home: /scratch/jenkins/addons/node/node-0.11.12-x86_64
  • In Advanced tab of the tool, set Exported path to: bin

If everything goes well, you should have a configuration similar to this screen shot:

custom-nodejs.png

Should you need another NodeJS version, just change 0.11.12 with the right number.

To use this tool in your job, check Install custom tools under Build Environment in job configuration page:

use-custom-nodejs.png

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.