Details
-
Suggestion
-
Resolution: Unresolved
-
None
-
None
Description
Currently Bamboo doesn't propagate to Bitbucket the logged in user (in Bamboo) whenever a Manual Trigger is made.
We have an option to use a script with in the plan/deployment that will grep the logged in user name. In order to retried the email we need to first enable the option under Cog icon > Overview> Security Settings > Edit button > * Enable contact details to be displayed?*
and install the libxml2-utils package on the server in order parse the xml from the script.
rm -rf data.xml curl -X GET "https://YOUR_BAMBOO_URL/rest/api/latest/search/users?searchTerm=${bamboo.ManualBuildTriggerReason.userName}" \ -H "Authorization: Bearer YOUR_ADMIN_PERSONAL_TOKEN" \ -H 'Content-Type: application/xml' >> data.xml EMAIL=$(/usr/bin/xmllint --xpath "string(/searchResults/searchResults/searchEntity/displayableEmail)" data.xml) git config --list git config user.name '${bamboo.ManualBuildTriggerReason.userName}' git config user.mail $EMAIL
Wheneven the local/global gif config is empty Bamboo will display on Bitbucket Bamboo role account as the committer. Currently when using the Repository Commit task it shows Atlassian Bamboo as the committer in Bitbucket.
It would be easier to match the manual trigger user is in the Repository Commit task we had a field to enter the user and its email so that git understands who's the committer.