By convention, an exit code that is not 0 is considered an error. jshint uses this to indicate that not all files passed.
Try adding an 'echo.' after the jshint call. IIRC the Batch step only needs the last command to succeed to not fail the build. On 14.01.2014, at 08:58, Simona Avornicesei <[email protected]> wrote: > Hi all, > > I have a Jenkins 1.546 instance installed as a service on a W7 machine. It > runs under a local admin account, the same account I use to RDP into that > machine. I installed nodejs v 0.10.24. > In one of the jobs I'm running the following build steps as windows batch > command: > batch command 1: > REM Installing nodejs jshint package > npm install -g jshint > npm install jshint > > batch command 2: > REM Running jshint with checkstyle on MyProject source code > jshint --verbose --reporter=checkstyle ./MyProject/app 1> > checkstyle-jshint.xml > REM Created checkstyle-jshint file > > REM Running jshint with jslint on MyProject source code > jshint --verbose --reporter=jslint ./MyProject/app 1> jslint.xml > REM Created jslint file > > > The job fails when executing the first command in batch2 but no error message > or hint is logged. The same commands run ok in Command Prompt. I've checked > and doublechecked the command line options of jshint, tried giving the > fullpath to the project by using %WORKSPACE%, replaced > with 1> - to no > avail. If I replace batch command 2 content with "jshint --version" the build > does not fail. > > This is the important part of the job log: > [workspace] $ cmd /c call C:\Temp\hudson1680110169794042148.bat > > D:\jenkins.space\jobs\MyProject_Deploy\workspace>REM Installing nodejs jshint > package > > D:\jenkins.space\jobs\MyProject_Deploy\workspace>npm install -g jshint > npm http GET https://registry.npmjs.org/jshint > npm http 304 https://registry.npmjs.org/jshint > npm http GET https://registry.npmjs.org/shelljs > npm http GET https://registry.npmjs.org/underscore > npm http GET https://registry.npmjs.org/cli > npm http GET https://registry.npmjs.org/minimatch > npm http GET https://registry.npmjs.org/htmlparser2 > npm http GET https://registry.npmjs.org/console-browserify > npm http 304 https://registry.npmjs.org/cli > npm http 304 https://registry.npmjs.org/minimatch > npm http 304 https://registry.npmjs.org/htmlparser2 > npm http 304 https://registry.npmjs.org/shelljs > npm http 304 https://registry.npmjs.org/underscore > npm http 304 https://registry.npmjs.org/console-browserify > npm http GET https://registry.npmjs.org/lru-cache > npm http GET https://registry.npmjs.org/sigmund > npm http GET https://registry.npmjs.org/glob > npm http 304 https://registry.npmjs.org/lru-cache > npm http 304 https://registry.npmjs.org/sigmund > npm http 304 https://registry.npmjs.org/glob > npm http GET https://registry.npmjs.org/domhandler > npm http GET https://registry.npmjs.org/domutils > npm http GET https://registry.npmjs.org/domelementtype > npm http GET https://registry.npmjs.org/readable-stream > npm http GET https://registry.npmjs.org/inherits > npm http 304 https://registry.npmjs.org/inherits > npm http 304 https://registry.npmjs.org/domelementtype > npm http 304 https://registry.npmjs.org/domutils > npm http 304 https://registry.npmjs.org/readable-stream > npm http 304 https://registry.npmjs.org/domhandler > C:\Users\jenkins\AppData\Roaming\npm\jshint -> > C:\Users\jenkins\AppData\Roaming\npm\node_modules\jshint\bin\jshint > [email protected] C:\Users\jenkins\AppData\Roaming\npm\node_modules\jshint > ├── [email protected] > ├── [email protected] > ├── [email protected] ([email protected], [email protected]) > ├── [email protected] > ├── [email protected] ([email protected]) > └── [email protected] ([email protected], [email protected], > [email protected], [email protected]) > [workspace] $ cmd /c call C:\Temp\hudson3001016805079027919.bat > > D:\jenkins.space\jobs\MyProject_Deploy\workspace>REM Running jshint with > checkstyle on MyProject source code > > D:\jenkins.space\jobs\MyProject_Deploy\workspace>jshint --verbose > --reporter=checkstyle ./MyProject/app 1>checkstyle-jshint.xml > Build step 'Execute Windows batch command' marked build as failure > > -- > 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]. > For more options, visit https://groups.google.com/groups/opt_out. -- 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]. For more options, visit https://groups.google.com/groups/opt_out.
