How do I add a comment ie: JIRA ticket number to the VCS tagging task?

We require any Subversion commits including creating tags or branches to have a JIRA ticket in the comment. There is no place to do this in the VCS tagging task in Bamboo 3.2. Is this fixed in a later release?

2 answers

This widget could not be displayed.

There's no plugin point available for the commit message. Being a licensed user, you can access the sources and modify the com.atlassian.bamboo.repository.svn.SvnRepository#copyRepository method to do whatever you want.

I would rather not modify the source for basic fuctionality. I will put in a feature request and use the script function until the VCS tagging task is usable....

This widget could not be displayed.

Hi Andrew, Did you guys arrive at a solution for adding a message during bamboos vcs tagging commit?

We also have an svn repo and it has a pre commit hook that forces the need for a message that Bamboo does not seem to supply.

Hi Lance,

The work around that we came up with was an edit to the hook script. I use a service account (svc-envbuild) to access SVN from Bamboo and we wrapped that part of the hook with the following so it ignores the hook when tagging. Not a great solution but it works for now. I am also watching BAM-10658...

if ($committer ne "svc-envbuild") {

# get commit message

my $holdTerminator = $/;

undef $/;

open IN, '-|', "$svnlookPath log $ARGV[0] --transaction $ARGV[1]" or die "Unable to get commit message with svnlook.\n";

my $buffer = <IN>;

close IN;

$/ = $holdTerminator;

my @lines = split /$holdTerminator/, $buffer;

$buffer = "init";

$buffer = join $holdTerminator, @lines;

chomp($buffer);

my $commitMessage = $buffer;

# print arguments

select(STDERR);

print "Committer: " . $committer . "\n";

print "Commit message: \"" . $commitMessage . "\"\n";

# invoke JIRA web service

my $acceptance;

my $comment;

eval {

$jiraBaseURL =~ s/\/+$//; # remove trailing '/' if exists

my $s = XMLRPC::Lite->proxy($jiraBaseURL . "/rpc/xmlrpc");

my $result = $s->call("commitacc.acceptCommit", $jiraLogin, $jiraPassword, $committer, $projectKey, $commitMessage)->result();

($acceptance, $comment) = split('\|', $result);

};

if ($@) {

($acceptance, $comment) = ("false", "Unable to connect to the JIRA server at \"" . $jiraBaseURL . "\".");

};

if($acceptance eq 'true') {

print "Commit accepted.\n";

exit 0;

} else {

$comment = HTML::Entities::decode($comment);

print "Commit rejected: " . $comment . "\n";

exit 1;

}

}

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

155 views 2 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you