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

NPM build in container not working

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: 4 - Normal
    • 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

          Issue Links

            Activity

              People

              Assignee:
              eyalb Eyal Ben Moshe
              Reporter:
              yannc Yann Chaysinh
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: