When both the NodeJS and RVM plugins are enabled for a single build, the build fails to run. It appears that the PATH accessible to the RVM plugin when it is setting up the environment is incorrect. We have used each of the plugins separately in our environment and they work fine.

      Here is example output from a build with nothing defined in it apart from enabling the two plugins.

      Started by user Ben Butler-Cole
      [EnvInject] - Loading node environment variables.
      Building remotely on civm02 in workspace /var/tmp/workspace/bbc-test
      Capturing environment variables produced by 'rvm use 1.9.3@release'
      $ bash -c export
      $ bash -c "test -f ~/.rvm/scripts/rvm"
      [bbc-test] $ bash -c " source ~/.rvm/scripts/rvm && rvm use --install --create 1.9.3@release && export > rvm.env"
      /home/ubuntu/.rvm/scripts/rvm: line 67: dirname: command not found
      /home/ubuntu/.rvm/scripts/rvm: line 96: dirname: command not found
      ERROR: Missing proper 'which' command. Make sure it is installed before using RVM!
      ERROR: Failed to setup RVM environment
      [BFA] Scanning build for known causes...
      
      [BFA] Done. 0s
      Notifying upstream projects of job completion
      Finished: FAILURE
      

      I have attached the system info for our system.

          [JENKINS-20636] RVM and NodeJS plugins are incompatible

          Ben Butler-Cole created issue -
          Ben Butler-Cole made changes -
          Description Original: When both the NodeJS and RVM plugins are enabled for a single build, the build fails to run. It appears that the PATH accessible to the RVM plugin when it is setting up the environment is incorrect.

          Here is example output from a build with nothing defined in it apart from enabling the two plugins. We have used each of the plugins separately in our environment and they work fine.

          {code}
          Started by user Ben Butler-Cole
          [EnvInject] - Loading node environment variables.
          Building remotely on civm02 in workspace /var/tmp/workspace/bbc-test
          Capturing environment variables produced by 'rvm use 1.9.3@release'
          $ bash -c export
          $ bash -c "test -f ~/.rvm/scripts/rvm"
          [bbc-test] $ bash -c " source ~/.rvm/scripts/rvm && rvm use --install --create 1.9.3@release && export > rvm.env"
          /home/ubuntu/.rvm/scripts/rvm: line 67: dirname: command not found
          /home/ubuntu/.rvm/scripts/rvm: line 96: dirname: command not found
          ERROR: Missing proper 'which' command. Make sure it is installed before using RVM!
          ERROR: Failed to setup RVM environment
          [BFA] Scanning build for known causes...

          [BFA] Done. 0s
          Notifying upstream projects of job completion
          Finished: FAILURE
          {code}

          I have attached the system info for our system.
          New: When both the NodeJS and RVM plugins are enabled for a single build, the build fails to run. It appears that the PATH accessible to the RVM plugin when it is setting up the environment is incorrect. We have used each of the plugins separately in our environment and they work fine.

          Here is example output from a build with nothing defined in it apart from enabling the two plugins.

          {code}
          Started by user Ben Butler-Cole
          [EnvInject] - Loading node environment variables.
          Building remotely on civm02 in workspace /var/tmp/workspace/bbc-test
          Capturing environment variables produced by 'rvm use 1.9.3@release'
          $ bash -c export
          $ bash -c "test -f ~/.rvm/scripts/rvm"
          [bbc-test] $ bash -c " source ~/.rvm/scripts/rvm && rvm use --install --create 1.9.3@release && export > rvm.env"
          /home/ubuntu/.rvm/scripts/rvm: line 67: dirname: command not found
          /home/ubuntu/.rvm/scripts/rvm: line 96: dirname: command not found
          ERROR: Missing proper 'which' command. Make sure it is installed before using RVM!
          ERROR: Failed to setup RVM environment
          [BFA] Scanning build for known causes...

          [BFA] Done. 0s
          Notifying upstream projects of job completion
          Finished: FAILURE
          {code}

          I have attached the system info for our system.
          Eito Katagiri made changes -
          Assignee New: Eito Katagiri [ eitoball ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 152161 ] New: JNJira + In-Review [ 178204 ]
          Sandra Thieme made changes -
          Assignee Original: Eito Katagiri [ eitoball ] New: Frédéric Camblor [ fcamblor ]
          Frédéric Camblor made changes -
          Assignee Original: Frédéric Camblor [ fcamblor ]
          Nikolas Falco made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Nikolas Falco made changes -
          Link New: This issue is duplicated by JENKINS-24425 [ JENKINS-24425 ]

            Unassigned Unassigned
            benbc Ben Butler-Cole
            Votes:
            6 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved: