JENKINS-64662 Create GitHub App Credentials Binding to support owner override#375
JENKINS-64662 Create GitHub App Credentials Binding to support owner override#375nrayapati wants to merge 11 commits intojenkinsci:masterfrom
Conversation
|
@bitwiseman @timja thoughts on this change? |
|
Really appreciate any feedback and steps to get this merged and released soon. Thank you! |
|
I have not updated this to deal with autoformatting. The steps needed: |
|
@bitwiseman Thank you for the feedback and addressed it. |
| cachedTokens = new ArrayList<>(); | ||
| } else { | ||
| Optional<AppInstallationToken> tempToken = | ||
| cachedTokens.stream() |
There was a problem hiding this comment.
if you are just going to keep one token wouldn't a Map make more sense and be more clear?
There was a problem hiding this comment.
I tried Map and changed it to List, I think I did that to avoid adding overrides to serialize/deserialize as this is transient field.
I think it is good to have that owner field with actual class just in case if we are going to use this token for future use cases across other classes.
There was a problem hiding this comment.
I tried Map and changed it to List, I think I did that to avoid adding overrides to serialize/deserialize as this is transient field.
Not sure why this is a reason to use List instead of Map.
I think it is good to have that owner field with actual class just in case if we are going to use this token for future use cases across other classes.
I'm not sure what you mean here.
|
In my case this doesn't solve the underlying issue, in a multibranch pipeline job I would still need one credential per organization to do the repository scan. |
|
@bitwiseman Any other thoughts on this change?, looks like we have closed the other PR that carlossg proposed |
| private List<AppInstallationToken> getCachedTokens() { | ||
| synchronized (this) { | ||
| return cachedToken; | ||
| return cachedTokens; |
There was a problem hiding this comment.
Similar to other recent changes, we should look at using concurrent hash map instead.
|
Hi all, How can I help to get this merged and released? |
|
Not sure I see the point of this. You can already specify an owner…? |
|
Perhaps #527 covers your requirement. |
|
Hi, is there any way to support here? We would like to have this feature as well especially to have actual credential binding for the GitHub App access token and to not have to use usernamePassword binding for this which btw I haven't found documented anywhere but just read about in the linked issue. That could probably be helpful for others as well. |
|
Closing this issue as it has been addressed in a more comprehensive solution. Created PR #875 which implements Multi-Organization GitHub App Credentials that support:
This provides a complete solution for multi-organization workflows without requiring duplicate credentials. See: #875 |
Description
Create GitHub App Credentials Binding to support owner override
See JENKINS-64662 for further information.
Submitter checklist
Reviewer checklist
Documentation changes
Users/aliases to notify
@bitwiseman @timja
Testing Results