How to find the user who performed a deployment in the Bamboo database
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
It may be necessary for data auditing, retention and reporting purposes to identify the user who executed a manual deployment in Bamboo via the database.
Solution
The user who executed the deployment can be found in the DEPLOYMENT_RESULT_CUSTOMDATA
table. It is stored in a CUSTOM_INFO_KEY
of 'ManualBuildTriggerReason.userName'
under the CUSTOM_INFO_VALUE
column.
Here is an example query that performs all the relevant joins to tie in deployment-related information and filters for deployments with a triggering user:
1
2
3
4
5
SELECT DP.*, DE.*, DR.*, DRCD.* FROM DEPLOYMENT_RESULT DR
JOIN DEPLOYMENT_RESULT_CUSTOMDATA DRCD ON DR.DEPLOYMENT_RESULT_ID = DRCD.DEPLOYMENT_RESULT_ID
JOIN DEPLOYMENT_ENVIRONMENT DE ON DR.ENVIRONMENT_ID = DE.ENVIRONMENT_ID
JOIN DEPLOYMENT_PROJECT DP ON DE.PACKAGE_DEFINITION_ID = DP.DEPLOYMENT_PROJECT_ID
WHERE CUSTOM_INFO_KEY = 'ManualBuildTriggerReason.userName';
Was this helpful?