hacklanta / hubot-yardmaster

Hubot plugin to control jobs on Jenkins CI
http://hacklanta.com/
MIT License
13 stars 6 forks source link

Variable Authentication: Allow users to authenticate into Jenkins with Hubot #18

Closed farmdawgnation closed 8 years ago

farmdawgnation commented 8 years ago

This PR creates the ability for a user to provide their own Jenkins authentication information to yardmaster so actions they request will be executed using their Jenkins account.

To authenticate you can do:

> hubot jenkins auth set farmdawgnation XXXXXXXXX
Attempting to authenticate you as farmdawgnation
Done. From now on I'll authenticate your requests to jenkins as farmdawgnation.

Additionally you can check your current authentication:

> hubot jenkins auth
You are authenticated with Jenkins as farmdawgnation

And clear your authentication

> hubot jenkins auth clear
I've removed your Jenkins credentials. Commands you issue will use my Jenkins credentials.
riveramj commented 8 years ago

if you enter in an incorrect api key (like missed the last letter), it'll still say done but when you try to build, it wont respond right away and eventually return

ERROR SyntaxError: Unexpected token < at Object.parse (native)

is there any way we can check if the auth is correct and return a message as appropriate?

farmdawgnation commented 8 years ago

Yeah, let me see what I can do about that.

farmdawgnation commented 8 years ago

Alright, gave this another pass with some added functionality to boot. Let me know what you think.

riveramj commented 8 years ago

Everything else tests :100:.

I looked at merge conflict and I think its just that buildBranch and buildFeedback where in the same spot but gonna let you fix that, as it should only take you a second.

will merge after that!

farmdawgnation commented 8 years ago

:white_check_mark:

farmdawgnation commented 8 years ago

Imma bout to turbo merge this if ya don't get to it soon Mike :P

riveramj commented 8 years ago

:tada: