-
Notifications
You must be signed in to change notification settings - Fork 567
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add parameter to set user uuid in jenkins::credentials define #227
Conversation
Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests |
Ooooo, with tests! I'll try to review this some time this week and try it out! |
4a6c226
to
dacaa68
Compare
@rtyler - Any progress on testing this? :) Please let me know if more tests are required |
@rtyler @madAndroid that would be very useful! hope it gets merged soon! |
The last CI run failed for this PR and it needs to be rebased on the current master due to changes introduced by #285. |
Cool, no worries - I'll rebase and sort out any conflicts |
dacaa68
to
ba47318
Compare
Rebased, and tests fixed :) ( https://travis-ci.org/jenkinsci/puppet-jenkins/builds/63873665 ) |
@@ -170,10 +170,13 @@ class Actions { | |||
)[0].getStore() | |||
|
|||
def credentials | |||
if (id == "") { | |||
id = null | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From looking at the existing code, I thought that the cli argument to method call conversion, actions."$action"(*args[1..-1])
, must be requiring string params to be defaulted to an empty string. However, I just tested it and there doesn't appear to be an issue with defaulting a string param to null
.
The id
param could be defaulted to null
and then this check wouldn't be needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, that might not make any sense. I'm not sure how you would pass null from the cli.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how you would pass null from the cli.
That's pretty much the issue I came up against, which is why I ended up taking this route.
👍 This looks good to me! CI didn't run; travis has been acting strange the last few days. I've had to force push some of my own branches in order to get it trigger. |
Odd, I did see the run on travis after I pushed the latest changes up .. results are here, AFAICT -> https://travis-ci.org/jenkinsci/puppet-jenkins/builds/63873665 |
An example of the use case where you may want to set the UUID during credential creation: JJB's SCM plugin allows you to set |
ea444bc
to
d473125
Compare
This looks pretty good to me. Mentioning the new param in the README might not hurt. (eg., https://github.com/jenkinsci/puppet-jenkins#credentials) One thing of note is that this does change the order of params to |
d473125
to
afb3a1a
Compare
@rtyler - anything more I need to do to have this merged? I've added tests, would you like me to expand upon those? |
ace89a3
to
abab419
Compare
massage travis into playing nice Revert "massage travis into playing nice" This reverts commit 86480e3.
abab419
to
cff1113
Compare
Hi, is there anything further than can be done to have this merged? Do you need me to justify the reason for the addition, and perhaps explain and describe our use case? @jhoblitt - in response to your query: the ordering of args in
I've rebased against the latest HEAD of master, and fixed tests that changed as a result of another merge. |
@madAndroid nope, thanks for the bump and the good contribution :) |
Add parameter to set user uuid in jenkins::credentials define
Awesome, thanks! :-)
|
This addresses #226 - It's largely influenced by the Opscode jenkins module, which has this functionality - https://github.com/opscode-cookbooks/jenkins/blob/master/libraries/credentials.rb