Webhook to Jenkins - What plugin do I use
While Webhook to Jenkins supports the Git and Bitbucket Branch Source plugins, the plugin that you decide to use as an endpoint determines which Jenkins jobs and features are available. Some jobs and features only work with the Bitbucket Branch Source plugin, while others are only supported when using the Git plugin.
Both plugins can exist on Jenkins simultaneously, but only one can be used as an endpoint for each repository. When Webhook to Jenkins is configured at a project level, all repositories in that project can use the plugin that is set in the Jenkins endpoint dropdown located in the Jenkins Instance(s) tab.
Git Plugin - Allows Jenkins to use git for Source Control Management (SCM) and provides basic operations for Jenkins projects. It can poll, fetch, checkout, branch, list, merge, tag, and push repositories.
Bitbucket Branch Source - Allows you to use Bitbucket Cloud and Server as a Jenkins multi-branch project source. This can either be as a single repository source or as a team/project folder.
The table below shows which jobs and features work with each plugin. Use this to determine which plugin best suits your needs.
Job/Feature | Supported Plugin | Notes |
---|---|---|
Jenkins - Multibranch pipeline job | Bitbucket Branch Source | Multibranch pipeline jobs can support both the Bitbucket Branch Source and Git plugins, but Bitbucket Branch Source is recommended. |
Jenkins - Freestyle job | Git | Freestyle jobs in Jenkins require the Git plugin. |
Jenkins - Configure Bitbucket endpoint | Bitbucket Branch Source | Configuring the Bitbucket endpoint in Jenkins is only necessary when using the Bitbucket Branch Source plugin. If you are using the Git plugin, this configuration is not required. |
Jenkins -Configuration Classic UI | Git or Bitbucket Branch Source | Either plugin can be used, but the one you use is dependent on the job type or feature you want to use. |
Jenkins - Blue Ocean | Bitbucket Branch Source | Bitbucket Branch Source is the recommended plugin when using Blue Ocean; however, the Git plugin can be used with Jenkins multibranch pipeline jobs. |
Webhook to Jenkins - Repo Clone URL | Git | Repo Clone URL is usually the same entry as the Jenkins URL. When the Bitbucket Branch Source plugin is selected as the Jenkins endpoint, this option is not available. |
Webhook to Jenkins - URL Parameters | Git | When the Bitbucket Branch Source plugin is selected as the Jenkins endpoint, this option is not available. |
Still not sure which plugin you’re using?
Does the Jenkins job you want to trigger already exist, but you are unsure which plugin it depends on?
Here are a couple of ways to figure out which plugin your job depends on:
Go to your Jenkins job.
Look in the sidebar. If you see Multibranch Pipeline, you are using a job that depends on the Bitbucket Branch Source plugin. Configure Webhook to Jenkins to use Bitbucket Branch Source.
Still not sure?
Click Configure.
Search the page for the term Poll SCM. If you can find it, you are using a freestyle project. Configure Webhook to Jenkins to use the Git plugin.
Â