Hey,

I'm trying to get nodejs plugin working in pipeline, here is example code:
pipeline {
agent any
environment {
TESTGLOBALVARIABLE = 'TEST'
}
tools {
nodejs '7.7.3'
}


jenkins gives me this error:

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: 7: Invalid tool type "nodejs". Valid tool types: [ant, 
hudson.tasks.Ant$AntInstallation, 
org.jenkinsci.plugins.docker.commons.tools.DockerTool, git, 
hudson.plugins.git.GitTool, go, 
org.jenkinsci.plugins.golang.GolangInstallation, gradle, 
hudson.plugins.gradle.GradleInstallation, jdk, hudson.model.JDK, jgit, 
org.jenkinsci.plugins.gitclient.JGitTool, jgitapache, 
org.jenkinsci.plugins.gitclient.JGitApacheTool, 
hudson.plugins.msbuild.MsBuildInstallation, 
org.jenkinsci.plugins.MsTestInstallation, maven, 
hudson.tasks.Maven$MavenInstallation, 
jenkins.plugins.nodejs.tools.NodeJSInstallation, 
org.jenkinsci.plugins.vs_code_metrics.VsCodeMetricsInstallation] @ line 7, 
column 9.
           nodejs '7.7.3'
           ^


According to stacktrace nodejs is not recognized and output suggests me to use 
jenkins.plugins.nodejs.tools.NodeJSInstallation instead, so here is new attempt:


pipeline {
    agent any
    environment {
        TESTGLOBALVARIABLE = 'TEST'
    }
    tools {
        jenkins.plugins.nodejs.tools.NodeJSInstallation '7.7.3'
    }


gives me this:

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: 7: unexpected token: 7.7.3 @ line 7, column 57.
   dejs.tools.NodeJSInstallation '7.7.3'
                                 ^



Any idea how to get this plugin working in pipeline mode ?


Thank you for any help or suggestions!

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/f8fabcb6-1749-4181-96c2-4e92968f171d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to