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.
From your Bitbucket repository, click the Repository Settings icon > Hooks and select Enabled or click Edit settings for Webhook to Jenkins for Bitbucket Server.
Click the Advanced Configuration tab and select the Build From option from the Branch Options dropdown. Set the value to
tag*is a portion of the tag name and a wildcard for any additional characters For example,
tagAif you used them in your naming convention.
Click Enable when finished.