Skip to end of banner
Go to start of banner

Configure Jenkins - Webhook to Jenkins for Bitbucket Cloud

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 16 Next »

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.

  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.

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

In this section

  • No labels