We have a Jenkins and we have a local Bitbucket Server.
We already installed
- "Bitbucket Plugin" on Jenkins
- "Post Webhooks" on Bitbucket
Then we set in jenkins
- Branches to build
- Branch Specifier to "**"
In Post Webhooks we checked all events.
Now when we push a branch or delete a Pull request, jenkins is triggered and seems to build every branch which has new commits. (But somehow it is not triggered when we create a pull request.)
The question is now: How do we get our test results to Bitbucket to block a merge when a test failes?
We found the Plugin "Violations to Bitbucket Server" but it only covers results of static code analysis and no jUnit or surfire reports.
The whole thing feels sketchy... Is there any good tutorial which tells how to integrate jenkins and bitbucket in both directions? Or is it not possible with available plugins?