Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

For Webhook to Jenkins for Bitbucket Cloud to work correctly, you must perform some configuration steps in Jenkins. This section provides these configuration steps.

This section does not include detailed instructions regarding the initial setup of your Jenkins or Bitbucket instances. For more information regarding these topics, refer to Bitbucket and Jenkins documentation.

Before you begin

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

  • Install the Git plugin in Jenkins. (Currently, the cloud version of Webhook to Jenkins for Bitbucket only supports the Git plugin)

  • Install Webhook to Jenkins for Bitbucket Cloud.

  • Make sure your Jenkins instance is public-facing. A public-facing instance is required to successfully establish a connection between Jenkins and Bitbucket Cloud using Webhook to Jenkins for Bitbucket Cloud.

  • Add a new instance to Jenkins in Bitbucket Cloud.

Configure Jenkins for use with Webhook to Jenkins

  1. Log into your Jenkins instance.

  2. Add or select the job you want to associate with your Bitbucket repository. We recommend choosing a Freestyle job that works best with the Git plugin.

  3. Once you are in the job, click Configure from the left menu.

  4. Select the Source Code Management tab and the Git option when the Configuration page opens.

  5. In the Repository URL field, enter the URL for the Bitbucket repository you want Jenkins to integrate with. This is the same URL as the one displayed in the Repo Clone URL field located in the Instance Details for your Jenkins instance of Webhook to Jenkins.

  6. Click Add to open the Jenkins Credentials Provider dialog and click the Kind pull down to open the list of available options. Select the credential type you want to use and click Add. While you can use any of the authentication methods that best fits your organization’s security policy, we recommend using SSH Username with private key. Go to Configure SSH Credentials for Webhook to Jenkins for Bitbucket for instructions on how to set up SSH credentials.

  7. In the Branches to build section, click Add Branch to identify the specific branches you want to track in a repository. Enter the branch in the Branch Specifier field. Leave the field blank for all branches to be examined for changes and build. By default the field is set to */master. Confirm the branch name is entered correctly. Click the Help icon next to the Branch Specifier for more formatting information.

    Image Added
  8. Select the Build Trigger tab.

  9. Select Poll SCM. This is an important step, as the build won’t trigger in Jenkins if this option is not selected.

Git plugin version 4.11.4 or higher requires the notifyCommit token. See Access token requirements for Git plugin 4.11.4+ for instructions regarding generating and using the token.

Info

You are currently in Webhook to Jenkins for Bitbucket Cloud documentation. Click Server/Data Center to move to that document.

Aura inline button
summaryServer/Data Center
paramsJTdCJTIybGFiZWwlMjIlM0ElMjJTZXJ2ZXIlMkZEYXRhJTIwQ2VudGVyJTIyJTJDJTIyc2l6ZSUyMiUzQSUyMm1lZGl1bSUyMiUyQyUyMnNoYXBlJTIyJTNBJTIyY2lyY3VsYXIlMjIlMkMlMjJzdGF0ZXMlMjIlM0ElN0IlMjJpZGxlJTIyJTNBJTdCJTIyY29sb3JzJTIyJTNBJTdCJTIyYmFja2dyb3VuZCUyMiUzQSUyMiUyM2Y5NmMyYyUyMiUyQyUyMmxhYmVsJTIyJTNBJTIyJTIzZmZmZmZmJTIyJTdEJTdEJTJDJTIyaG92ZXIlMjIlM0ElN0IlMjJjb2xvcnMlMjIlM0ElN0IlMjJiYWNrZ3JvdW5kJTIyJTNBJTIyJTIzZmZmZmZmJTIyJTJDJTIyb3V0bGluZSUyMiUzQSUyMiUyM2Y5NmMyYyUyMiUyQyUyMmxhYmVsJTIyJTNBJTIyJTIzZjk2YzJjJTIyJTdEJTdEJTdEJTJDJTIyaWNvbiUyMiUzQSU3QiUyMnBvc2l0aW9uJTIyJTNBJTIybGVmdCUyMiUyQyUyMmljb24lMjIlM0ElMjJmYS1zZXJ2ZXIlMjIlN0QlMkMlMjJsaW5rJTIyJTNBJTdCJTIydmFsdWUlMjIlM0ElMjIxNTA4OTY3MDYlMjIlMkMlMjJ0eXBlJTIyJTNBJTIycGFnZSUyMiU3RCU3RA==

In this section

Table of Contents
minLevel1
maxLevel3
exclude4