Configure a Bitbucket Server Webhook

Webhook to Codefresh

  1. In Stash, install the Stash Webhook to Jenkins plugin.
  1. Navigate to your Bitbucket repository, and in the left navigation pane, click the Settings tab.

Pasted image at 2016_10_06 07_39 PM.png

  1. Under the Workflow section, click Hooks.
  1. Click the Enabled button for the Stash Post-Receive Webhook to Jenkins hook.


  1. In the Jenkins URL text box, enter the URL{account_name} the Repository URL. {account_name} is your Stash account name in Codefresh. You can use the Repo Clone URL drop-down menu to get the clone URL for each supported protocol.


  1. Click the Trigger Jenkins button to test your configuration.


Enabling Auto Build / Webhook Settings

You can configure your pipeline to automatically trigger by setting a webhook on your git repository. To enable the auto build, on the Pipeline configuration page, toggle the AUTO BUILD setting to the ON position. NOTE: Only the repository owners can set webhooks. You can refine the webhook configuration to trigger only on specific branches by selecting the CUSTOM REGEX option in the TRIGGER FLOW ON field, and then set a regular expression. Only branches that match the regular expression trigger the pipeline.