This plugin is a revision of original Bitbucket Pull Request Builder Plugin. It was started by adding support for Bitbucket webhooks and resulted in massive rewrite and deleting the code. Jenkins 2.60+ is required.
This plugin needs credentials to access Bitbucket API. The credentials comprise the user's name and a password. This password is known as "App password" and it is not the same as the user's password.
Only Git repositories are supported.
These environment variables are set when the job is triggered by this plugin:
bbprbDestinationBranch
bbprbDestinationCommitHash
bbprbDestinationRepository
bbprbPullRequestAuthor
bbprbPullRequestId
bbprbPullRequestTitle
bbprbSourceBranch
bbprbSourceCommitHash
bbprbSourceRepository
Recommended Git configuration:
- Repository URL:
[email protected]:${bbprbDestinationRepository}.git
- Branch Specifier:
${bbprbSourceCommitHash}
- [Optional] Branch to merge to:
${bbprbDestinationBranch}
Trigger's options in Jenkins graphical user interface:
Trigger's options in the job's XML configuration file:
<triggers>
<org.jenkinsci.plugins.bbprb.BitbucketBuildTrigger plugin="[email protected]">
<spec></spec>
<ciKey>jenkins</ciKey>
<ciName>Jenkins</ciName>
<credentialsId>bitbucket-pwd</credentialsId>
<destinationRepository>bbuser/gitrepository</destinationRepository>
<cancelOutdatedJobs>true</cancelOutdatedJobs>
</org.jenkinsci.plugins.bbprb.BitbucketBuildTrigger>
</triggers>
The end-point is /bbprb-hook/
. Currently only two events are supported:
pull request is created and pull request is updated.
Use Apache Maven to build and package the plugin:
$ cd bbprb
$ mvn install
This will create the file ./target/bbprb.hpi
that you can deploy to Jenkins.
See Jenkins Plugin tutorial for more details.
Other useful commands are mvn compile
, mvn hpi:hpi
.
(C) 2017-2018 Igor Pashev [email protected].
(C) 2014 S.nishio + Martin Damovsky.
This plugin is free software under the BSD License.