Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-40624

nodejs installer not compatible with declarative pipeline definition

    XMLWordPrintable

Details

    Description

      The following pipeline does not work, as NodeJSInstallation seems not to add node and npm to the classpath.

      pipeline {
      
        tools {
          "jenkins.plugins.nodejs.tools.NodeJSInstallation" "NodeJS_0.10.33"
        }
      
        agent any
        stages {
      
          stage ('test') {
            steps {
                sh "node --version"
                sh "npm --version"
            }
          }
        }
      }
      

      Attachments

        Issue Links

          Activity

            nfalco Nikolas Falco added a comment - - edited

            Current pipeline DSL supported are for:

            • nodejs tool definition
              pipeline {
                  agent any
              
                  tools {
                      nodejs 'Node 6.x'
                  }
              
                  stages {
                      stage('Build') {
                          steps {
                              sh 'npm -version'
                          }
                      }
                  }
              }
              
            • and nodejs build step
              pipeline {
                  agent any
              
                  stages {
                      stage('Build') {
                          steps {
                              nodejs(nodeJSInstallationName: 'Node 6.x', configId: null) {
                                  sh 'npm config ls'
                              }
                          }
                      }
                  }
              }
              

            robwatts the code was merged in master.
            Before it is released could anyone provides feedback?
            A mvn clean package is sufficient to create a snapshot from source code

            nfalco Nikolas Falco added a comment - - edited Current pipeline DSL supported are for: nodejs tool definition pipeline { agent any tools { nodejs 'Node 6.x' } stages { stage('Build') { steps { sh 'npm -version' } } } } and nodejs build step pipeline { agent any stages { stage('Build') { steps { nodejs(nodeJSInstallationName: 'Node 6.x', configId: null) { sh 'npm config ls' } } } } } robwatts the code was merged in master. Before it is released could anyone provides feedback? A mvn clean package is sufficient to create a snapshot from source code

            Code changed in jenkins
            User: Nikolas Falco
            Path:
            src/main/java/jenkins/plugins/nodejs/tools/NodeJSInstallation.java
            src/test/java/jenkins/plugins/nodejs/NpmrcFileSupplyTest.java
            http://jenkins-ci.org/commit/nodejs-plugin/15db7f5faf3a6fbb3a558f0150684b88654eb6e1
            Log:
            JENKINS-40624 Fix test case, miss to remove assert on environment

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nikolas Falco Path: src/main/java/jenkins/plugins/nodejs/tools/NodeJSInstallation.java src/test/java/jenkins/plugins/nodejs/NpmrcFileSupplyTest.java http://jenkins-ci.org/commit/nodejs-plugin/15db7f5faf3a6fbb3a558f0150684b88654eb6e1 Log: JENKINS-40624 Fix test case, miss to remove assert on environment

            Code changed in jenkins
            User: Nikolas Falco
            Path:
            src/main/java/jenkins/plugins/nodejs/NodeJSCommandInterpreter.java
            src/main/java/jenkins/plugins/nodejs/tools/NodeJSInstallation.java
            src/main/java/jenkins/plugins/nodejs/tools/NodeJSInstaller.java
            src/test/java/jenkins/plugins/nodejs/NodeJSInstallerTest.java
            http://jenkins-ci.org/commit/nodejs-plugin/8a3cfc8079711395159d966e375e2cf2955fcd1f
            Log:
            Fix regression of JENKINS-40624

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nikolas Falco Path: src/main/java/jenkins/plugins/nodejs/NodeJSCommandInterpreter.java src/main/java/jenkins/plugins/nodejs/tools/NodeJSInstallation.java src/main/java/jenkins/plugins/nodejs/tools/NodeJSInstaller.java src/test/java/jenkins/plugins/nodejs/NodeJSInstallerTest.java http://jenkins-ci.org/commit/nodejs-plugin/8a3cfc8079711395159d966e375e2cf2955fcd1f Log: Fix regression of JENKINS-40624

            Code changed in jenkins
            User: Nikolas Falco
            Path:
            src/main/java/jenkins/plugins/nodejs/NodeJSCommandInterpreter.java
            src/main/java/jenkins/plugins/nodejs/tools/NodeJSInstallation.java
            http://jenkins-ci.org/commit/nodejs-plugin/240e4dd95a0db65453e7c11ccd350900973dc403
            Log:
            Fix regression of JENKINS-40624 in path construction of executable and bin folder because all API similar to java.lang.File have to be wrapped in a callable executed on the target node or paths will be calculated based on the master node O.S.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nikolas Falco Path: src/main/java/jenkins/plugins/nodejs/NodeJSCommandInterpreter.java src/main/java/jenkins/plugins/nodejs/tools/NodeJSInstallation.java http://jenkins-ci.org/commit/nodejs-plugin/240e4dd95a0db65453e7c11ccd350900973dc403 Log: Fix regression of JENKINS-40624 in path construction of executable and bin folder because all API similar to java.lang.File have to be wrapped in a callable executed on the target node or paths will be calculated based on the master node O.S.

            Code changed in jenkins
            User: Jesse Glick
            Path:
            COMPATIBILITY.md
            http://jenkins-ci.org/commit/pipeline-plugin/ddf73bebcafd7bca9293f28b8fa84a0d7bda478b
            Log:
            Merge pull request #430 from nfalco79/master

            JENKINS-40624 Update COMPATIBILITY.md to update NodeJS plugin

            Compare: https://github.com/jenkinsci/pipeline-plugin/compare/b293156039a2...ddf73bebcafd

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: COMPATIBILITY.md http://jenkins-ci.org/commit/pipeline-plugin/ddf73bebcafd7bca9293f28b8fa84a0d7bda478b Log: Merge pull request #430 from nfalco79/master JENKINS-40624 Update COMPATIBILITY.md to update NodeJS plugin Compare: https://github.com/jenkinsci/pipeline-plugin/compare/b293156039a2...ddf73bebcafd

            People

              nfalco Nikolas Falco
              imod Dominik Bartholdi
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: