Bitbucket Integration

Article ID:115000053071
1 minute readKnowledge base

Issue

  • I would like to trigger Jenkins from Bitbucket Server/Cloud repositories

Environment

Resolution

On every Git repository there is a hidden .git folder and inside the .git folder there is a hooks subfolder. This folder can hold scripts that are executed by Git when it performs certain operations. This feature is well documented (see Customizing Git - Git Hooks in the Git documentation).

Bitbucket Cloud and Bitbucket Server provide support to create hooks for your repositories. But implementations are different:

This difference in implementations is one of the reasons why solutions differs in Jenkins whether you use Bitbucket Cloud or Server. Plugins are often designed to integrate with one solution only.

Configuration

Note: We strongly encourage to use Pipeline and Pipeline Multibranch.

In order to better guide you through this, have a look at the article that correspond to your environment:

Troubleshooting

To troubleshoot issues with any of these solutions, please have a look at: