cliffano / nestor

Jenkins CLI and node.js client
http://blog.cliffano.com/tag/nestor/
MIT License
182 stars 27 forks source link

A streaming API of job console output #10

Closed 5long closed 11 years ago

5long commented 11 years ago

Hi,

I'm about to implement a simple continuous deployment dashboard integrating with Jenkins and I just stumbled upon nestor. A readable stream would be easier for me to implement a stream -> websocket proxy for browser. Luckily the current implementation is fairly complete and all I have to do is a little refactoring to get this far.

However, this pull request is by no means complete:

Feel free to tell me what more should I do to get this merged.

5long commented 11 years ago

I've just setup Travis-CI and it seems that I just broke the build.

Problem is, I can't run tests locally. Here are my steps:

Any ideas how I can run tests before pushing?

cliffano commented 11 years ago

What's the output of node --version && bob --version ? I've just tested bob build and it worked fine on master.

The unit tests (in test directory) pretty much mock the console output, so you'll need to look at how you can do the same thing. Don't worry about integration tests (in test-integration directory), I only run it on my local Jenkins due to its dependency to a running Jenkins CI.

Once you get the build passing, do you mind opening a new pull request with a single commit for these changes? That would be easier to read.

5long commented 11 years ago

I was running nodejs v0.8.22 and bob 0.5.16. I just reinstalled bob 0.5.17 and it still fails.

But I also realized that I've got a long abandoned incomplete ~/.jshintrc file on this machine. Removing ~/.jshintrc and now bob build builds just like how it works on Travis.

And yes, it's totally okay for me to squash all commits into a single one. Now I'd go fix those test failures.

cliffano commented 11 years ago

Cool. I've also just added 0.10 and 0.11 to Travis CI run, to make sure everything passes. https://travis-ci.org/cliffano/nestor/builds/5935345

5long commented 11 years ago

I've decided to just port all existing tests of .console() to .consoleStream() since there isn't much stuff to test in .console(). The code is landed in d85d521

cliffano commented 11 years ago

Closing this one, replaced by #11