Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Not A Defect
    • Component/s: nodejs-plugin
    • Labels:
      None
    • Environment:
      jenkinsci/blueocean:1.8.2
      jenkins:2.121.3
      org.jenkins-ci.plugins:nodejs:1.2.6
    • Similar Issues:

      Description

      1. Create a new Jenkins environment: 

      docker run --name jenkins -u root --rm -d -p 8080:8080 -v jenkins-data:/var/jenkins_home jenkinsci/blueocean:latest

      2. Add node-8.11.3 as a global tool named "node".

      3. Add the following pipeline:

      pipeline {
          agent any
          tools {
              nodejs 'node'
          }
          stages {
              stage('Example') {
                  steps {
                      sh 'npm --version'
                  }
              }
        }
      }
      

       4. Run it.

      The result:

      Running in Durability level: MAX_SURVIVABILITY
      [Pipeline] node
      Running on Jenkins in /var/jenkins_home/workspace/test
      [Pipeline] {
      [Pipeline] stage
      [Pipeline] { (Declarative: Tool Install)
      [Pipeline] tool
      [Pipeline] envVarsForTool
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] withEnv
      [Pipeline] {
      [Pipeline] stage
      [Pipeline] { (Example)
      [Pipeline] tool
      [Pipeline] envVarsForTool
      [Pipeline] withEnv
      [Pipeline] {
      [Pipeline] sh
      [test] Running shell script
      + npm --version
      env: ‘node’: No such file or directory
      [Pipeline] }
      [Pipeline] // withEnv
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // withEnv
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      ERROR: script returned exit code 127
      Finished: FAILURE
      

      I see in the past this has happened due to an issue with the "env-inject" plugin, but that issue has been fixed, and I do not have that plugin installed.

        Attachments

          Activity

          Hide
          jonrimmer Jon Rimmer added a comment -

          OK, I figured this out: The jenkins/blueocean image is based on Alpine Linux, but the binaries downloaded by the nodejs plugin are not compatible with it.

          Show
          jonrimmer Jon Rimmer added a comment - OK, I figured this out: The jenkins/blueocean image is based on Alpine Linux, but the binaries downloaded by the nodejs plugin are not compatible with it.

            People

            • Assignee:
              nfalco Nikolas Falco
              Reporter:
              jonrimmer Jon Rimmer
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: