This Jenkins plugin builds pull requests from Bitbucket.org and will report the test results.
This repo is looking for a new maintainer.
git@bitbucket.org:${repositoryOwner}/${repositoryName}.git
*/${sourceBranch}
* * * * *
will check for new pull requests every minutejenkins@densan-labs.net
pipeline {
agent any
triggers{
bitbucketpr(projectPath:'',
bitbucketServer:'<BITBUCKET_SERVER_URL>',
cron: 'H/15 * * * *',
credentialsId: '',
username: '',
password: '',
repositoryOwner: '',
repositoryName: '',
branchesFilter: '',
branchesFilterBySCMIncludes: false,
ciKey: '',
ciName: '',
ciSkipPhrases: '',
checkDestinationCommit: false,
approveIfSuccess: false,
cancelOutdatedJobs: true,
buildChronologically: true,
commentTrigger: '')
}
}
Note that the projectPath
parameter does not need to be set if bitbucketServer
, repositoryOwner
, and
repositoryName
is set.
You can use jenkins credentials by setting environment variables in the environment
section
and referring to them like for example "${env.BITBUCKET_CREDENTIALS_USR}"
.
After you set up your Jenkins pipeline, run the job for the first time manually (otherwise the trigger may not work!)
You may want Jenkins to attempt to merge your PR before building. This may help expose inconsistencies between the source branch and target branch. Note that if the merge cannot be completed, the build will fail immediately.
If you are merging into your target branch, you might want Jenkins to do a new build of the Pull Request when the target branch changes.
If you want to rerun a pull request build, write a comment on your pull request reading “test this please”.
sourceBranch
targetBranch
repositoryOwner
repositoryName
pullRequestId
destinationRepositoryOwner
destinationRepositoryName
pullRequestTitle
pullRequestAuthor
Do not use Fork jenkinsci/bitbucket-pullrequest-builder-plugin for contribution
Use project nishio-dens/bitbucket-pullrequest-builder-plugin
Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
Fork the project.
Start a feature/bugfix branch.
Commit and push until you are happy with your contribution.
Do you like this plugin? feel free to donate!
Paypal: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=LTXCF78GJ7224
BTC: 1KgwyVzefeNzJhuzqLq36E3bZi2WFjibMr
Thank you!
Copyright © 2022 S.nishio + Martin Damovsky + David Frascone