Trigger Jenkins build when a specific tag is pushed

Configure the Webhook to Jenkins Branch Options features to only trigger builds when tags that match a specific pattern are pushed.

Configure Bitbucket Server

This guide assumes Webhook to Jenkins has already been installed and configured as described in the configuration guide.

  1. From your Bitbucket repository, click the Repository Settings icon > Hooks and select Enabled or click Edit settings for Webhook to Jenkins for Bitbucket Server.

  2. Click the Advanced Configuration tab and select the Build From option from the Branch Options dropdown. Set the value to refs/tags/tag*, where tag* is a portion of the tag name and a wildcard for any additional characters For example, tag* would include tag1, tag2, or tagA if you used them in your naming convention.

  3. Click Enable when finished.

Related Articles