We're using this code to add NodeJS via NVM. The value that we have in
DEFAULT_NODEJS_VERSION is 6.
def addNVM(def nvmversion=DEFAULT_NODEJS_VERSION){
this.job.with {
configure { project ->
project / buildWrappers <<
'org.jenkinsci.plugins.nvm.NvmWrapper' {
version(nvmversion)
}
}
}
return this
}
When NodeJS version 6 is installed, the default npm version that is
installed is 3.10.x. Unfortunately, we need npm version 5 or higher. Is
there a way to also upgrade npm to 5 or higher using the code above?
We don't want to tell our hundreds of users to add an "Execute Shell" to
run "npm install -g npm@latest" since we have thousand of jobs. However, if
it can be done in the groovy since we build our jenkins slave from time to
time, that would be awesome.
Thanks!
Neil
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/ddbc73c3-1261-4e2d-9a89-173f4d4fd85b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.