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.
Information
Smart Mirrors currently 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 and 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.
Information
If Smart Mirror has not been previously configured, the Mirror Server dropdown does not appear.
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.
If you need to revert to normal behavior, the Primary option must be selected.