---
title: "Configuration"
canonical: "https://support.appfire.com/space/JENK/150896838/Configuration"
format: markdown
---
> Macro (aura-html)

Several steps are required to configure Jenkins to integrate with your Bitbucket repository. 

- Configuring Jenkins using either the [Classic UI](https://appfire.atlassian.net/wiki/spaces/JENK/pages/150896706/Jenkins+configuration#Jenkins-configuration---Classic-UI) or the [Blue Ocean](https://appfire.atlassian.net/wiki/spaces/JENK/pages/150896706/Jenkins+configuration#Jenkins-configuration---Blue-Ocean) plugin
- Configuring Bitbucket:
  - Globally - Administration (gear icon top right) > Jenkins instances
  - Project or Repository hook settings
- Implementing General Settings or Advanced Configuration features depending on your development requirements.

To successfully use Webhook to Jenkins, the configuration process is made up of two parts:

- Your Jenkins instance
- Your Bitbucket project or repository

This document does not include detailed instructions regarding the initial setup of your Jenkins or Bitbucket instances. For more information regarding these topics, refer to [Bitbucket](https://support.atlassian.com/bitbucket-cloud/resources/) and [Jenkins](https://www.jenkins.io/doc/) documentation.

## Before you begin

Before you begin configuring your Jenkins instance, confirm the following actions  have been performed:

- Install either the [Bitbucket Branch Source](https://plugins.jenkins.io/cloudbees-bitbucket-branch-source/) plugin or the [Git](https://plugins.jenkins.io/git/) plugin, depending on the option you and your organization use. Refer to the what plugin should I use page for more information.
- [Install ](https://appfire.atlassian.net/wiki/spaces/JENK/pages/150896714)Webhook to Jenkins.
- [Add a new instance to Jenkins in Bitbucket](https://appfire.atlassian.net/wiki/spaces/JENK/pages/150896838/Configuration#Add-a-new-instance-of-Jenkins-in-Bitbucket).

## Add a new instance of Jenkins in Bitbucket

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 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

1. Log into your Bitbucket instance as an Administrator.
2. Click the **Administration** icon in the top right corner to open the Administration page.
3. Under *ADD-ONS*, click **Jenkins Servers.**
  
4. Click **Add New Instance**.
5. 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+](https://appfire.atlassian.net/wiki/spaces/JENK/pages/150896871) for information on how to generate the token. When using an earlier version of the Git plugin, the `notifyCommit` token is not required.
  
6. 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.

1. Confirm you are logged into Bitbucket as an Administrator.
2. Select the project you want to associate with Jenkins.
3. Click **Project Settings **⚙️  from the left sidebar.
4. 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:

1. Select the *Scope* (**Global**, **Project**) from the dropdown list.
2. Click **Add New Instance**.
3. 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+](https://appfire.atlassian.net/wiki/spaces/JENK/pages/150896871) on how to generate the token. When using an earlier version of the Git plugin, the `notifyCommit` 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](https://appfire.atlassian.net/wiki/spaces/JENK/pages/150896854) 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.

1. Confirm you are logged into Bitbucket as an Administrator.
2. Select the project you want to associate with Jenkins.
3. Click **Repository Settings** ⚙️ from the left sidebar.
4. 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:

1. Select the *Scope* (**Global**, **Project**) from the dropdown list.
2. Click **Add New Instance**.
3. 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+](https://appfire.atlassian.net/wiki/spaces/JENK/pages/150896871) on how to generate the token. When using an earlier version of the Git plugin, the `notifyCommit` token is not required.
  
4. 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](https://appfire.atlassian.net/wiki/spaces/JENK/pages/150896854) 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.

Proceed to the [Jenkins configuration](https://appfire.atlassian.net/wiki/spaces/JENK/pages/150896706) or [Bitbucket configuration](https://appfire.atlassian.net/wiki/spaces/JENK/pages/150896854) sections.