-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major
-
Component/s: nodejs-plugin
-
None
Declarative pipeline example:
pipeline {
agent any
stages {
stage('Without NPM'){
steps {
echo PATH
}
}
stage('With NPM'){
tools {
nodejs 'Node v6'
}
steps {
echo PATH
}
}
}
}
Output
[Pipeline] node
Running on master in /data/jenkins/workspace/_playground
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Without NPM)
[Pipeline] echo
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (With NPM)
[Pipeline] tool
[Pipeline] envVarsForTool
[Pipeline] withEnv
[Pipeline] {
[Pipeline] echo
/data/jenkins/tools/jenkins.plugins.nodejs.tools.NodeJSInstallation/Node_v6/bin
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
Finished: SUCCESS
- is duplicated by
-
JENKINS-42198 NodeJS plugin causes sh to fail in a declarative pipline
-
- Closed
-