Can I run multiple node version on Jenkins?

Viewed 4254

Currently I met one problem about Jenkins.

The ex-projects are using Angular 4 with node version 8.

The new project is using Angular 8 with node version 12.

Is there any way to config multiple node version on Jenkins?

3 Answers

THe NodeJS plugin should allow you to declare multiple NodeJS installation in the global settings

https://wiki.jenkins.io/download/attachments/46334885/image2018-3-31%2016%3A40%3A29.png?version=1&modificationDate=1522507231000&api=v2

I recommend you to install nvm by default on your agents and edit the version you want to use by a simple command :

nvm use 12.4

Why?
Because installing a Jenkins plugin requires maintenance and I personally ended up with the above solution because it's more flexible and you have more control.

How to install nvm

Related