cliffano / nestor

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

New 'last' command #26

Closed kelveden closed 10 years ago

kelveden commented 10 years ago

More verbosely, the command is 'show me the details of the last build for this job'. Essentially it's just summarising the details from the /jenkins/job/job1/lastBuild/api/json response. The output looks something like this:

job1 | SUCCESS

(Note that the status will be "BUILDING" if the job is in the process of being built.)

What do you think? In particular I'm not so sure if mapping of the "result" field to colour in cli.js is the best place for it.

kelveden commented 10 years ago

Ah, the build is failing. I'll take a look.

kelveden commented 10 years ago

Am a bit perplexed by the failing integration test - I've not changed anything in this area that I can see. Also, if I run bob build against either my fork OR the HEAD of cliffano/nestor I get the same failure which looks similar to the travis failure but not exactly the same:

Command dashboard should display error when URL does not exist
test-integration/failure.yml
JENKINS_URL=http://someinexistinghost ../../../../../bin/nestor dashboard
Exit code 1 does not match expected 0
Output does not match expected regexp 'getaddrinfo ENOTFOUND'
exec dir: .bob/test-integration/cmdt-1395330981476-1714/test-integration/failure.yml

output: Unexpected status code: 404

Does anyone have any ideas what's going on?

cliffano commented 10 years ago

@kelveden Thanks for this PR, I'll have a look this weekend. Integration test problem could be caused by cmdt refactoring I did few days ago, I've been working on a local fix but still need to do more tests before master. Sorry about this.

kelveden commented 10 years ago

@cliffano No problem. There's no rush as far as I'm concerned - I'm happily using the command via my fork anyway.

kelveden commented 10 years ago

@cliffano: Do you have a release planned to npm?

cliffano commented 10 years ago

Sorry it took so long, been busy distracted working on other stuffs :(.

I just published nestor@0.2.4 which includes the last command.

kelveden commented 10 years ago

No worries @cliffano. Awesome, thanks for that!