3
votes

I am trying to integrate Atlassian Bamboo with a CloudFormation template that creates and deploys environments in AWS. One of the tags we add to the VPCs and EC2 instances is the name of the engineer that triggered the build.

I can't find a bamboo variable that contains the name of the user that triggered a build. I found one that has the username of the person who created a release in Jira, but this isn't what I want.

https://confluence.atlassian.com/display/BAMBOO/Bamboo+variables

Is there a way to get this variable?

1

1 Answers

5
votes

You are looking for ManualBuildTriggerReason.userName, that will be the name of the person who manually triggered a build but if it was off a trigger this will not be present.

For the name of the person who didn't trigger the build manually but did it through a source code commit then you could probably be:

git log <commitFrom>..<commitTo> --format="%aN <%aE>" --reverse

And then you could use repository.revision.number for the current revision and then repository.previous.revision.number for the previous revision.