The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.
For a list of other such plugins, see the Pipeline Steps Reference page.
bbs_checkout
: BitbucketSCMStepprojectName : String
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, ~jsmith.
repositoryName : String
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.
branches
(optional)
name : String
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 bar
.
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. origin/release/
Possible options:
<branchName>
refs/heads/<branchName>
.master
, feature1
, ...refs/heads/<branchName>
refs/heads/master
, refs/heads/feature1/master
, ...<remoteRepoName>/<branchName>
refs/heads/<branchName>
.origin/master
remotes/<remoteRepoName>/<branchName>
remotes/origin/master
refs/remotes/<remoteRepoName>/<branchName>
refs/remotes/origin/master
<tagName>
refs/tags/<tagName>
instead.git-2.3.0
refs/tags/<tagName>
refs/tags/git-2.3.0
<commitId>
5062ac843f2b947733e6a3b105977056821bd352
, 5062ac84
, ...${ENV_VARIABLE}
${TREEISH}
, refs/tags/${TAGNAME}
, ...<Wildcards>
REPOSITORYNAME/BRANCH
. In addition, BRANCH
is 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 origin/branches-foo
but not origin/branches/foo
, while origin/branches**
would match both origin/branches-foo
and origin/branches/foo
.:<regular expression>
:regexp
. Regular expression syntax in branches to build will only build those branches whose names match the regular expression.:^(?!(origin/prefix)).*
origin
or origin/master
or origin/feature
origin/prefix
or origin/prefix_123
or origin/prefix-abc
:origin/release-\d{8}
origin/release-20150101
origin/release-2015010
or origin/release-201501011
or origin/release-20150101-something
:^(?!origin/master$|origin/develop$).*
origin/branch1
or origin/branch-2
or origin/master123
or origin/develop-123
origin/master
or origin/develop
changelog : boolean
(optional)
If 'Include in changelog' is enabled for an SCM source, then when a build occurs, the changes from that SCM source will be included in the changelog.
If 'Include in changelog' is disabled, then when a build occurs, the changes from this SCM source will not be included in the changelog.
credentialsId : String
(optional)
When running a job, Jenkins requires credentials to authenticate with Bitbucket Server. For example, to checkout the source code for builds. To do this, it needs credentials with access to the projects and repositories you want it to build from.
You can provide Jenkins with credentials here by:
In addition, you can provide Jenkins with SSH credentials below. If you do, Jenkins will use them for clone operations instead of the credentials you select here.
id : String
(optional)
mirrorName : String
(optional)
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.
poll : boolean
(optional)
If 'Include in polling' is enabled or 'Include in changelog' is enabled, then when polling occurs, the job will be started if changes are detected from this SCM source.
If 'Include in polling' is disabled and 'Include in changelog' is disabled, then when polling occurs, changes that are detected from this repository will be ignored.
serverId : String
(optional)
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.
serverName : String
(optional)
sshCredentialsId : String
(optional)
If specified, Jenkins will use these credentials to check out the source code for builds. If no SSH credentials are specified, Jenkins will use the basic credentials instead.
To provide Jenkins with SSH credentials, you can:
bbs_deploy
: Wrapper step to notify Bitbucket Server of the deployment status.environmentName : String
A human-readable display name for the environment that was deployed to.
environmentKey : String
(optional)
This is a unique identifier for the environment in Bitbucket Server. You can name it something readable like MY-ENV
, or you can leave it blank and have it auto-generated by the plugin.
environmentType : String
(optional)
The type of environment that was deployed to, or 'None' if the environment type does not apply.
environmentUrl : String
(optional)
step([$class: 'DeploymentNotifier'])
: Notify Bitbucket Server of deploymentenvironmentName : String
A human-readable display name for the environment that was deployed to.
environmentKey : String
(optional)
This is a unique identifier for the environment in Bitbucket Server. You can name it something readable like MY-ENV
, or you can leave it blank and have it auto-generated by the plugin.
environmentType : String
(optional)
The type of environment that was deployed to, or 'None' if the environment type does not apply.
environmentUrl : String
(optional)
Please submit your feedback about this page through this quick form.
Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?
See existing feedback here.