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

Nodejs plugin should be able to access npmrc files configured inside folders

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      If a npmrc file is created inside a folder, the nodjs plugin dropdown wont show it.

        Attachments

          Activity

          lidl Sven Brosi created issue -
          Hide
          peter_willekens Peter Willekens added a comment -

          Same problem for us.

          Show
          peter_willekens Peter Willekens added a comment - Same problem for us.
          imod Dominik Bartholdi made changes -
          Field Original Value New Value
          Component/s cloudbees-folder-plugin [ 18137 ]
          Component/s config-file-provider-plugin [ 16140 ]
          Assignee Dominik Bartholdi [ domi ] Nikolas Falco [ nfalco ]
          Hide
          nfalco Nikolas Falco added a comment - - edited

          Sven Brosi what means "If a npmrc file is created inside a folder" ?

          The dropdown in build step or build environment option shows only files of kind "Npm config file" present in "Config File Management" through the config plugin.

          If you want nodejs use a custom .npmrc placed somewhere than add npm_config_userconfig as environment variable that point to your file. Consider that npm lookup some default places. Have a look here https://docs.npmjs.com/files/npmrc#files.
          For example if you put the .npmrc in the root of the job workspace is it used by default and have precedence on other files

          Show
          nfalco Nikolas Falco added a comment - - edited Sven Brosi what means "If a npmrc file is created inside a folder" ? The dropdown in build step or build environment option shows only files of kind "Npm config file" present in "Config File Management" through the config plugin. If you want nodejs use a custom .npmrc placed somewhere than add npm_config_userconfig as environment variable that point to your file. Consider that npm lookup some default places. Have a look here https://docs.npmjs.com/files/npmrc#files . For example if you put the .npmrc in the root of the job workspace is it used by default and have precedence on other files
          Hide
          bartdevriendt Bart Devriendt added a comment - - edited

          Nikolas Falco

          With folder we mean a folder in Jenkins where you can group jobs.  When you create a new item you can select the option folder.  On folder level it is possible to define configuration files.  But the nodejs plugin doesn't take these into account when showing the list of available configuration files.  We use folders to group jobs per team and also apply security rules on these folders.

          Show
          bartdevriendt Bart Devriendt added a comment - - edited Nikolas Falco With folder we mean a folder in Jenkins where you can group jobs.  When you create a new item you can select the option folder.  On folder level it is possible to define configuration files.  But the nodejs plugin doesn't take these into account when showing the list of available configuration files.  We use folders to group jobs per team and also apply security rules on these folders.
          Hide
          nfalco Nikolas Falco added a comment -

          thank you now it's clear. I should check how use the config-file-provider plugin API to get files of folder because now seems returns only global

          Show
          nfalco Nikolas Falco added a comment - thank you now it's clear. I should check how use the config-file-provider plugin API to get files of folder because now seems returns only global
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Nikolas Falco
          Path:
          pom.xml
          src/main/java/jenkins/plugins/nodejs/NodeJSBuildWrapper.java
          src/main/java/jenkins/plugins/nodejs/NodeJSCommandInterpreter.java
          src/main/java/jenkins/plugins/nodejs/NodeJSDescriptorUtils.java
          src/main/java/jenkins/plugins/nodejs/configfiles/NPMConfig.java
          src/main/java/jenkins/plugins/nodejs/configfiles/NPMRegistry.java
          src/main/resources/jenkins/plugins/nodejs/Messages.properties
          src/main/resources/jenkins/plugins/nodejs/Messages_fr.properties
          src/main/resources/jenkins/plugins/nodejs/Messages_it.properties
          src/main/resources/jenkins/plugins/nodejs/NodeJSBuildWrapper/config.jelly
          src/main/resources/jenkins/plugins/nodejs/NodeJSBuildWrapper/config.properties
          src/main/resources/jenkins/plugins/nodejs/NodeJSBuildWrapper/config_it.properties
          src/main/resources/jenkins/plugins/nodejs/NodeJSCommandInterpreter/config.jelly
          src/main/resources/jenkins/plugins/nodejs/NodeJSCommandInterpreter/config_it.properties
          src/test/java/jenkins/plugins/nodejs/NodeJSBuildWrapperTest.java
          src/test/java/jenkins/plugins/nodejs/configfiles/NPMRegistryValidatorTest.java
          http://jenkins-ci.org/commit/nodejs-plugin/39b10a415054ebbc77e07bae4e7bbde47983d7f2
          Log:
          JENKINS-49469 Add support for managed file configured in a folder.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nikolas Falco Path: pom.xml src/main/java/jenkins/plugins/nodejs/NodeJSBuildWrapper.java src/main/java/jenkins/plugins/nodejs/NodeJSCommandInterpreter.java src/main/java/jenkins/plugins/nodejs/NodeJSDescriptorUtils.java src/main/java/jenkins/plugins/nodejs/configfiles/NPMConfig.java src/main/java/jenkins/plugins/nodejs/configfiles/NPMRegistry.java src/main/resources/jenkins/plugins/nodejs/Messages.properties src/main/resources/jenkins/plugins/nodejs/Messages_fr.properties src/main/resources/jenkins/plugins/nodejs/Messages_it.properties src/main/resources/jenkins/plugins/nodejs/NodeJSBuildWrapper/config.jelly src/main/resources/jenkins/plugins/nodejs/NodeJSBuildWrapper/config.properties src/main/resources/jenkins/plugins/nodejs/NodeJSBuildWrapper/config_it.properties src/main/resources/jenkins/plugins/nodejs/NodeJSCommandInterpreter/config.jelly src/main/resources/jenkins/plugins/nodejs/NodeJSCommandInterpreter/config_it.properties src/test/java/jenkins/plugins/nodejs/NodeJSBuildWrapperTest.java src/test/java/jenkins/plugins/nodejs/configfiles/NPMRegistryValidatorTest.java http://jenkins-ci.org/commit/nodejs-plugin/39b10a415054ebbc77e07bae4e7bbde47983d7f2 Log: JENKINS-49469 Add support for managed file configured in a folder.
          nfalco Nikolas Falco made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          nfalco Nikolas Falco made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Resolved [ 5 ]

            People

            Assignee:
            nfalco Nikolas Falco
            Reporter:
            lidl Sven Brosi
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: