For a list of other such plugins, see the Pipeline Steps Reference page.
Specify the branches if you'd like to track a specific branch in a repository. If left blank, all branches will be examined for changes and built.
The safest way is to use the
refs/heads/<branchName> syntax. This way the expected branch is unambiguous.
If your branch name has a
/ in it make sure to use the full reference above. When not presented with a full path the plugin will only use the part of the string right of the last slash. Meaning
foo/bar will actually match
If you use a wildcard branch specifier, with a slash (e.g.
release/), you'll need to specify the origin repository in the branch names to make sure changes are picked up. So e.g.
REPOSITORYNAME/BRANCH. In addition,
BRANCHis recognized as a shorthand of
*/BRANCH, '*' is recognized as a wildcard, and '**' is recognized as wildcard that includes the separator '/'. Therefore,
origin/branches**would match both
:regexp. Regular expression syntax in branches to build will only build those branches whose names match the regular expression.
When running a job, Jenkins will use these credentials to check out the source code for builds. For Jenkins to do this, it needs credentials with access to the projects and repositories you want it to build from.
To provide Jenkins with credentials you can:
Enter the name of the Bitbucket Server project containing the repository you want Jenkins to build from. To find a project, start typing. If it doesn't appear in the search results, the credentials that you've chosen may not have read access to it and you'll need to provide different credentials.
To get Jenkins to build from a personal repository, enter a tilde (
~) followed by repository owner's username. For example,
Enter the Bitbucket Server repository you want Jenkins to build from. To find a repository, start typing. If it doesn't appear in the search results, the credentials that you've chosen may not have read access to it and you'll need to provide different credentials.
To get Jenkins to build from a personal repository, enter its slug. This is the URL-friendly version of the repository name. For example, a repository called my example repo will have the slug my-example-repo, and you can see this in its URL, https://bitbucketserver.mycompany.com/myproject/my-example-repo.
Choose the Bitbucket Server instance containing the repository you want Jenkins to build from. If you can't find your instance, check this plugin's configuration and try again.
Choose the location that Jenkins should clone from when running this build. This can be the primary server or a mirror if one is available. To see available mirrors, first choose a Bitbucket Server project and repository.