/
Configure Webhook to Jenkins with Smart Mirrors

Configure Webhook to Jenkins with Smart Mirrors

Smart Mirrors allow you to use local mirror instances for git operations, which can significantly increase speed and performance for distributed teams working with large repositories.

Webhook to Jenkins can be configured to use this mirror as it requires URL clones for each build.

Currently, Smart Mirrors only works with the Git Plugin.

Setup

When Smart Mirror is configured correctly, Bitbucket shows the mirror as an option when providing a clone URL:

Choose your mirror and use the Clone URL to configure your Jenkins job.

Log in to your Bitbucket repository, navigate to Repository Settings > Hooks > Enable, or click the Edit setting for Webhooks to Jenkins Server icon. Select the mirror from the Mirror Server dropdown in the Jenkins Instance(s) tab.

The Mirror Server dropdown does not appear if Smart Mirror has not been configured.

Selecting a mirror changes the plugin behavior by triggering Jenkins only when the selected mirror is synchronized with the primary server. The Clone URL changes accordingly to the selected mirror.

The Primary option must be selected if you need to revert to normal behavior.

 

Related content

Webhook to Jenkins configuration
Webhook to Jenkins configuration
More like this
Bitbucket configuration
Bitbucket configuration
More like this
Get all jobs for a chosen repository
Get all jobs for a chosen repository
Read with this
Webhook to Jenkins - What plugin do I use
Webhook to Jenkins - What plugin do I use
Read with this
Configuring with Direct Job Trigger
Configuring with Direct Job Trigger
Read with this
Access token requirements for Git plugin 4.11.4+
Access token requirements for Git plugin 4.11.4+
Read with this