...
Install either the Bitbucket Branch Source plugin or the Git plugin, depending on the option you and your organization use. Refer to the what plugin should I use page for more information.
Install Webhook to Jenkins.
...
Adding an instance of Jenkins in Bitbucket makes configuring project-level and repository-level easier by allowing Webhook to Jenkins to use the entered Jenkins instance location to set as the default URL.
While the instructions in this section are optional, we recommend this step as it makes subsequent setup and configuration steps simpler.
Global level
Log into your Bitbucket instance as an Administrator.
Click the Administration icon in the top right corner to open the Administration page.
Under AddADD-onsONS, click Jenkins Servers.
Click Add New Instance.
Enter the Jenkins instance URL in the Jenkins Base field, your Jenkins Username and Password, and if you are using Git plugin version 4.11.4 or higher, the
notifyCommit
access token. See Access token requirements for Git plugin 4.11.4+ for information on how to generate the token. When using an earlier version of the Git plugin, thenotifyCommit
token is not required.Click Save Instance.
You can also access this page through Bitbucket Administration (Administration > Manage Apps > Webhook to Jenkins for Bitbucket > Configure).
Project level
A new Jenkins instance can also be created at the Project level by Admins that have this level of access.
Confirm you are logged into Bitbucket as an Administrator.
Select the project you want to associate with Jenkins.
Click Project Settings ⚙️ from the left sidebar.
Click Webhook to Jenkins for Bitbucket under the ADD-ONS heading. The Webhook to Jenkins for Bitbucket page opens.
To add a new Jenkins instance:
Select the Scope (Global, Project) from the dropdown list.
Click Add New Instance.
Enter the Jenkins instance URL in the Jenkins Base field, your Jenkins Username and Password, and if you are using Git plugin version 4.11.4 or higher, the
notifyCommit
access token. See Access token requirements for Git plugin 4.11.4+ on how to generate the token. When using an earlier version of the Git plugin, thenotifyCommit
token is not required.
Click Save instance. A successful entry appears in the Jenkins instance list.
From this page you can also:
View the current Hook status
Access Hook Settings (See Bitbucket Configuration for more information)
Access Documentation
Contact Support
Repository level
A new Jenkins instance can also be created at the Repository level by Administrators that have this level of access.
Confirm you are logged into Bitbucket as an Administrator.
Select the project you want to associate with Jenkins.
Click Repository Settings ⚙️ from the left sidebar.
Click Webhook to Jenkins for Bitbucket under the ADD-ONS heading. The Webhook to Jenkins for Bitbucket page opens.
To add a new Jenkins instance:
Select the Scope (Global, Project) from the dropdown list.
Click Add New Instance.
Enter the Jenkins instance URL in the Jenkins Base field, your Jenkins Username and Password, and if you are using Git plugin version 4.11.4 or higher, the
notifyCommit
access token. See Access token requirements for Git plugin 4.11.4+ on how to generate the token. When using an earlier version of the Git plugin, thenotifyCommit
token is not required.Click Save instance. A successful entry appears in the Jenkins instance list.
From this page you can also:
View the current Hook status
Access Hook Settings (See Bitbucket Configuration for more information)
Access Documentation
Contact Support
When configuring Webhook to Jenkins at both the project and repository levels, the Jenkins instance URL is the default entry in the URL field.
...