New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JENKINS-33507] Add support for the Bitbucket server. #5
[JENKINS-33507] Add support for the Bitbucket server. #5
Conversation
This commit serves to be able to use this plugin with the Bitbucket server instance. I'm also creating an plugin for Bitbucket server for this to work. This will send ( just like the cloud ) events when a PR is created/updated and when a push is done. This way we can use the same functionality for both Cloud and Server.
This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation. |
+1 |
1 similar comment
+1 |
* Represents a push event coming from Bitbucket (webhooks). | ||
*/ | ||
public interface BitbucketPushEvent | ||
{ |
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.
Please, follow the current code style in the rest of the code base.
Looks good in general, and I like the idea to use an OSS plugin at Bitbucket side also, thanks for it. I didn't have time to test it locally, but I want to do it. In the meantime, please fix the code style comments and merge with master (there are conflicts now). |
…-plugin into feature/moreSupportForBBServer # Conflicts: # src/main/java/com/cloudbees/jenkins/plugins/bitbucket/hooks/BitbucketSCMSourcePushHookReceiver.java
@amuniz Thanks for the review, I've resolved the conflict and fixed the code style. |
Is this now suitable for merging? |
I've tested the PR locally in combination with https://marketplace.atlassian.com/plugins/nl.topicus.bitbucket.bitbucket-webhooks/server/overview . Works like a charm. |
@amuniz Can this PR be merged now? It seems your comments are processed. |
@amuniz Had any time to test this lately? I think a lot of people are waiting on a new release with this. :) |
Please merge this. We just purchased a license of Cloudbees and can't do what we want without this. FYI, I built and installed the plugin from snapshot and it doesn't appear to be working. I am using BitBucket Server version 4.5.2 and CloudBees version "Jenkins ver. 1.642.18.2 (CloudBees Jenkins Enterprise 15.11)" I am using the Webhook to Jenkins for Bitbucket plugin in BitBucket (https://marketplace.atlassian.com/plugins/com.nerdwin15.stash-stash-webhook-jenkins/server/overview) |
I did try that one as well and had similar issues. I will build a fresh Jenkins server and test again. Is this the correct endpoint to use: /bitbucket-scmsource-hook/notify EDIT: Realized I was building the plugin off of master instead of the feature branch. After building from the correct branch I confirmed this is working as expected. |
Hi guys, I was wondering if there's a timetable for the merge of this PR? I saw that everything seems to be working fine. Thanks, |
Another Cloudbees customer here, very interested in seeing this get merged if all concerns have been satisfied. Big thinks to @Eernie for putting this together. |
I will try to escalate it internally but I don't expect to have some help this week with Jenkins World. But if some of you are going to JW, don't hesitate to kidnapp @amuniz up until it reviews/merge/release it :-P |
@aheritier Thanks for that, I'm hoping the list of PR's can be merged and released quickly. 👍 |
@aheritier with friends like you I prefer enemies 😛 BTW we need a way to test this kind of changes ideally without the need of a running BB Server, if someone come up with a solution for that, it would be more than welcome!! (maybe an embedded dumb JSON server returning static files suffice, TBD). |
@amuniz 😗 ❤️ I love you too |
Glad to hear this should be merged soon, was trying to use the auto webhook feature earlier today to find out it can only be used with bitbucket cloud! Good work all :) |
@Eernie Is there any reason that this needs to use your own plugin for bitbucket? Could it not use the more widely used (and so more likely to be installed on an enterprise bitbucket) plugin found here https://marketplace.atlassian.com/plugins/com.atlassian.stash.plugin.stash-web-post-receive-hooks-plugin/server/overview |
@zackpollard I've tried that first. But after implementing that version I noticed that you're limited to 5 Calls per repo and you're limited to pushes only. The hook wouldn't get triggered when making a pull request. |
I believe that the pull request thing is actually a bug in the more recent versions of bitbucket. As for auto registering that would be possible as you can do it through the API, I have done this for another automated setup we are currently using. via Newton Mail [https://cloudmagic.com/k/d/mailapp?ct=pa&cv=8.6.38&pv=7.0&source=email_footer_2] On Thu, Sep 15, 2016 at 9:38 PM, Erwin Oldenkamp < notifications@github.com [notifications@github.com] > wrote: — |
Then still there isn't a way to be as complient as the cloud version is. There you can choose the different events you want to send. The plugin you sent is a close source solution. So creating features for it wouldn't be posible. Therefor implementing the different kind of events wouldn't be possible. |
Yea it would just be nice to have additional options as in large enterprise wide bitbucket instances getting plugins installed can be difficult, so using what is already installed is easier :P via Newton Mail [https://cloudmagic.com/k/d/mailapp?ct=pa&cv=8.6.38&pv=7.0&source=email_footer_2] On Thu, Sep 15, 2016 at 9:53 PM, Erwin Oldenkamp < notifications@github.com [notifications@github.com] > wrote: — |
…B Server uses uppercase for usernames)
This has been merged into master manually. I fixed some minor glitches (users being uppercase in Bitbucket Server) and other minor changes. |
Always run BranchIndexing on master
JENKINS-33507
I made some changes to the code to enable more support for Bitbucket server.
I also made a plugin for Bitbucket which is currently submitted for approval. When both installed Bitbucket can successfully send events to the jenkins machine.
See bitbucket-webhooks-plugin repo for more information about the Bitbucket plugin.
The plugin is also accepted by atlassian.
@reviewbybees