Your first hack saved my sanity. Have you actually found a more elegant solution to this?
Thanks a lot, Gabriel On Friday, January 9, 2015 at 11:58:26 AM UTC-5, David Spector wrote: > > Hi, > > Looking for some advise/help on using Jenkins (ver. 1.596) on OS X (10.10) > and testing NodeJS apps...I am running into to 2 issues: > > 1) PATH problems - Is there a common way of exporting PATH to Jenkins > jobs? When trying to test NodeJS apps the job doesn't seem to have access > to /usr/local/bin; adding an "execute script" section to the job and using > "export PATH=$PATH:/usr/local/bin" makes the node installation visible but > I get the feeling this is pretty much a hack and there's a better way to do > this. > > 2) When using the mocha test reporter to test a tiny NodeJS example, npm > can't find the "unit" module. Run from the regular command line this works > fine (nom dynamically d/ls all the needed modules), but when run from a > test stanza inside the packages.json I get a back trace like this: > > > [email protected] test > /Users/Shared/Jenkins/Home/jobs/IttyBittyJSApp/workspace > > mocha --recursive -R xunit test/ > test-reports.xml > > > module.js:340 > throw err; > ^ > Error: Cannot find module 'unit.js' > at Function.Module._resolveFilename (module.js:338:15) > at Function.Module._load (module.js:280:25) > at Module.require (module.js:364:17) > at require (module.js:380:17) > at Object.<anonymous> > : > : > > > the packages.json file is pretty straightforward: > > { > "name": "IttyBittyJSApp", > "description": "A tiny little demo app to test Pingpads CI Server", > "version": "0.0.1", > "preferGlobal": true, > "private": true, > "dependencies": { > }, > "devDependencies": { > "unit": "0.1.0", > "nunit": "latest", > "mocha": "latest", > "simple": "latest" > }, > "scripts": { > "test": "./node_modules/.bin/mocha --recursive -R xunit test/ > > test-reports.xml" > } > } > > > Any suggestions would be greatly appreciated > > cheers, > Dave > > -- 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/9a39f082-b8a0-4fd4-9a6d-2b2a4c885c3d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
