I don't know if it works or not but you could try the way to set path
mentioned @
http://serverfault.com/questions/16355/how-to-set-global-path-on-os-x

Basically looks like you could add a file within /etc/path.d called
'localbin' (or something) with '/usr/local/bin' in the file and it might
end up getting added to the PATH (possibly after reboot?)

Richard.

On Tue, 12 May 2015 at 14:00 gabriel catalin troia <[email protected]>
wrote:

> Hmm,
>
> My environment is a bit unconventional. I'm running a virtual instance of
> Yosemite, which acts as the Jenkins Master, using Vagrant. It's configured
> to start up at launchtime like so:
>
> ln -sfv /usr/local/opt/jenkins/*.plist ~/Library/LaunchAgents
>
>
>
>
> On Mon, May 11, 2015 at 9:54 PM, Richard Bywater <[email protected]>
> wrote:
>
>> I should have probably also asked what your Jenkins setup is - that is,
>> is the Mac part just a Jenkins Slave run by another master or is the Mac
>> also your Jenkins Master. (And then if it is the Jenkins master, how are
>> you starting it up?)
>>
>> Answers to these questions will help determine the best location for the
>> PATH statement as depending on what option has been used, some files may or
>> may not get read (and hence PATH may not be being picked up)
>>
>> Richard.
>>
>> On Tue, 12 May 2015 at 13:43 gabriel catalin troia <
>> [email protected]> wrote:
>>
>>> Hi Richard,
>>>
>>> the PATH actually exists in ~/bash_profile.rc. The solution I found here
>>> <https://groups.google.com/forum/#!searchin/jenkinsci-users/npm/jenkinsci-users/8WvKTxL1KWg/QUPCbUHW8SAJ>
>>> though, was to export the path in the actual script, each time the build
>>> process runs. This seems kinda' hacky and a bit weird but it works.
>>>
>>> Thanks for your reply,
>>> Gabriel
>>>
>>> On Mon, May 11, 2015 at 9:35 PM, Richard Bywater <[email protected]>
>>> wrote:
>>>
>>>> Is /usr/local/bin in the PATH variable for the user that Jenkins is
>>>> running as? Sounds like it isn't but if you fix that it should "just work".
>>>>
>>>> Richard.
>>>>
>>>> On Tue, 12 May 2015 at 13:30 Gabriel C. Troia <[email protected]>
>>>> wrote:
>>>>
>>>>> Before I start, I want to say that I already checked these answers:
>>>>>
>>>>> Jenkins build step fails on 'npm install <whatever>'
>>>>> <http://stackoverflow.com/questions/11564508/jenkins-build-step-fails-on-npm-install-whatever>
>>>>>
>>>>> Jenkin's build failing on npm install
>>>>> <http://stackoverflow.com/questions/27661573/jenkins-build-failing-on-npm-install>
>>>>>
>>>>> Now, I'm dealing with this issue for a while already and thus I tried
>>>>> a bunch of stuff.
>>>>>
>>>>> Firstly, I installed node + npm via homebrew. A simple $ node -v and $
>>>>> npm -v echoed the version v0.10.36 for node and v2.3.* for npm, which
>>>>> also means I HAVE THEM IN THE PATH and they work while called in the
>>>>> terminal.
>>>>>
>>>>> Simply adding node -v; npm -v to the *execute shell* in Jenkins
>>>>> didn't do it. After a bit of tinkering I copied what $: which node yielded
>>>>> in the terminal to the above mentioned script, which now looked like this:
>>>>> /usr/local/bin/node and apparently that worked. The Jenkins build
>>>>> succeeded and 'node-v0.10.36' was proudly displayed in the *console
>>>>> output*.
>>>>>
>>>>> When doing the same for 'npm' which happened to be /usr/local/bin/npm
>>>>> --version the computing gods weren't so merciful anymore. A big '*env:
>>>>> node: No such file or directory*' error was thrown this time and the
>>>>> whole build failed.
>>>>>
>>>>> The actual command that fails is $ /bin/sh -xe
>>>>> /var/folders/wr/g_dl81tn5_x0t_yz3jw602cr0000gn/T/hudson8770480548136671253.sh
>>>>>  and
>>>>> "surprisingly" when I run the same command in the terminal it succeeds.
>>>>>
>>>>> I also uninstalled the homebrew node & npm versions and installed them
>>>>> afterwards via the package manager. Same results.
>>>>>
>>>>> Ultimately I also did this: https://gist.github.com/DanHerbert/9520689,
>>>>> with no luck.
>>>>>
>>>>> *Notes:*
>>>>>
>>>>>    - I'm running Jenkins 1.613 and tried with 1.5**
>>>>>    - I didn't create a "Jenkins" specific user but instead I'm using
>>>>>    the admin. This happens to be the same user that Jenkins runs, since 
>>>>> the who
>>>>>    am i command inside the executable script yields the admin's user
>>>>>    name.
>>>>>    - sudo'ing doens't help
>>>>>    - I'm also running the whole thing in a Virtual Environment -
>>>>>    vagrant
>>>>>    - I'm not running Jenkins as a deamon, as it's conflicting with
>>>>>    xtools, but as a simple process
>>>>>    - I also tried out jenkins-node plugin with various configs (can
>>>>>    detail if needed)
>>>>>
>>>>> Thanks a lot for your help, and let me know if you need any other
>>>>> info, screenshots, logs, etc.
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Jenkins Users" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/jenkinsci-users/cc5a5d98-d706-4366-bd72-154454c42b45%40googlegroups.com
>>>>> <https://groups.google.com/d/msgid/jenkinsci-users/cc5a5d98-d706-4366-bd72-154454c42b45%40googlegroups.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>  --
>>>> You received this message because you are subscribed to a topic in the
>>>> Google Groups "Jenkins Users" group.
>>>> To unsubscribe from this topic, visit
>>>> https://groups.google.com/d/topic/jenkinsci-users/We28-Fi9M5c/unsubscribe
>>>> .
>>>> To unsubscribe from this group and all its topics, send an email to
>>>> [email protected].
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/jenkinsci-users/CAMui947VzvLVP70E0r2NkJZBiQn9ub2U3GSucUqKwBfov%3DXuug%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/jenkinsci-users/CAMui947VzvLVP70E0r2NkJZBiQn9ub2U3GSucUqKwBfov%3DXuug%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>
>>>
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/jenkinsci-users/CADoc%2BX1fWaqpvPEemWyyPLOT2SbwCihTKHafG_W%2BTwfqTfb%2BMQ%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/jenkinsci-users/CADoc%2BX1fWaqpvPEemWyyPLOT2SbwCihTKHafG_W%2BTwfqTfb%2BMQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>  --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Jenkins Users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/jenkinsci-users/We28-Fi9M5c/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>>
> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jenkinsci-users/CAMui944W0WNHaiPtioVbVGC01MSU08XHK28KSb1BCTa7i6SuQQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/jenkinsci-users/CAMui944W0WNHaiPtioVbVGC01MSU08XHK28KSb1BCTa7i6SuQQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>
>
>> For more options, visit https://groups.google.com/d/optout.
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/CADoc%2BX3pWvnAVUR%3DSv9TORLSoZ0mc0Erm36TEJQZgdM0n2EKwg%40mail.gmail.com
> <https://groups.google.com/d/msgid/jenkinsci-users/CADoc%2BX3pWvnAVUR%3DSv9TORLSoZ0mc0Erm36TEJQZgdM0n2EKwg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAMui9460caem3HGt3fRn29zFPjMpSg8%3DhFyJ-bu2ueyJerGueQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to