Is there an easy/straight-forward way for Bamboo to fail a build if there are no legit Jira tickets in SVN commit message?
You can install a pre-commit hook in the Subversion server that rejected a commit based on the fact that a valid unresolved JIRA issue key was not found in the commit message. There are a dozen or so pre-commit hooks for this purpose already out there, so you wouldn't have to develop your own.
You could try adding a script task. The simplest case:
svn log -r ${bamboo.custom.svn.lastchange.revision.number}:${bamboo.custom.svn.revision.number} | egrep 'PROJ1-|PROJ2-' || exit 1
would fail a build if no commits in a build have something that looks like a JIRA ticket in the comment body.
If you want to check that the JIRA tickets actually do exist, or make sure that each commit in a build has a JIRA ticket, you need to parse the svn log output and make REST calls to JIRA to query for tickets.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We have dozens of projects always being added, but this is a great start. I suppose I could use Jira's API to check if the ticket exists ... there's no plugins out there like that that already exist?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.