How to relate a release with deployment project, environment and build plan in 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
The steps outlined on this article are provided AS-IS. This means we've had reports of them working for some customers — under certain circumstances — yet are not officially supported, nor can we guarantee they'll work for your specific scenario.
You may follow through and validate them on your own non-prod environments prior to production or fall back to supported alternatives if they don't work out.
We also invite you to reach out to our Community for matters that fall beyond Atlassian's scope of support!
The purpose of this page is to provide a DB query that will help link a release with a deployment project, deployment environment, and build plan in Bamboo
The content on this page relates to platforms which are supported; however, the content is out of scope of our Atlassian Support Offerings. Consequently, Atlassian cannot guarantee support. Please be aware that this material is provided for your information only and you may use it at your own risk.
Building SQL statements for reporting purposes is not part of the Atlassian Support scope and this work is provided "as-is", on a best-effort basis. Queries may work better or worse than expected, your mileage may vary. It is up to each customer to analyze each query individually and understand if that is enough for their specific needs.
Environment
The query has been tested for PostgreSQL and MySQL DBMSs.
Solution
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
SELECT DP.NAME deploy_proj_name,
DE.NAME deploy_env_name,
B.BUILD_ID deploy_plan_id,
DVP.PLAN_KEY build_plan,
DR.VERSION_NAME deployed_release
FROM DEP_VERSION_PLANRESULTKEYS DVP
JOIN DEPLOYMENT_VERSION DV
ON DVP.DEPLOYMENT_VERSION_ID = DV.DEPLOYMENT_VERSION_ID
JOIN DEPLOYMENT_RESULT DR
ON DV.DEPLOYMENT_VERSION_ID = DR.VERSION_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
JOIN BUILD B
ON DVP.PLAN_KEY = B.FULL_KEY
Was this helpful?