Trigger Jenkins based on new tags
To configure a job to build tags, confirm the Bitbucket Server and Jenkins job have been configured as described below.
Configure Bitbucket Server
Ensure Advanced Configuration > Branch Options > Build All is selected in the hook configuration. This skips the allowlist and blocklist checks so that all new commits and tags send the required Jenkins notification.
Set up a Jenkins Job for Tags
In the job, set refspec
to +refs/tags/*:refs/remotes/origin/tags/*
. Set the branch specifier to refs/tags/**
. This configures the job so it only responds to new tags.