Uploaded image for project: 'Jenkins Artifactory Plug-in'
  1. Jenkins Artifactory Plug-in
  2. HAP-1297

NPM build in container not working

    XML Printable

    Details

    • Type: Bug
    • Status: Resolved
      A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved
    • Resolution: Done
    • Affects Version/s: 3.5.0
    • Fix Version/s: 3.6.0
    • Component/s: None
    • Labels:
      None

      Description

      When running an NPM build in a container using Declarative pipeline, the NPM client has to be installed on the docker host (even though if it's in the container).

      The provided jenkinsfile shows that the "npm --version" can be invoked in a shell task, however the Artifactory plugin seems to look for npm on the docker host not the container.

      To reproduce :

      • Linux box with docker and npm
      • jenkins installed on the VM (not in a container)
      • run the jenkinsfile (attachment)
      • "break" the npm command (for instance, remove the symbolik link '/bin/npm')

      Even if if use the NODEJS_HOME environment variable, the build breaks

      npm_install_ko.txtnpm_jenkinsfile

        Attachments

        1. npm_install_ko.txt
          3 kB
        2. npm_jenkinsfile
          1 kB

          Issue Links

            活动

              People

              Assignee:
              eyalbEyal Ben Moshe [X] (Inactive)
              Reporter:
              yanncYann Chaysinh [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: