Query the database to find details about a specific deployment task
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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
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!
Summary
SQL Query to get details about a specific deployment task.
Environment
Tested on 6.10.4
Solution
Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.
Run the following SQL query against the Bamboo database to find details about a specific deployment task.
SELECT DP.NAME AS "DEPLOYMENT",
DP.PLAN_KEY AS "PLAN_KEY",
DE.NAME AS "ENVIRONMENT",
DE.XML_DEFINITION_DATA AS "TASK_DEFINITION"
FROM DEPLOYMENT_PROJECT DP
JOIN DEPLOYMENT_ENVIRONMENT DE ON DP.DEPLOYMENT_PROJECT_ID = DE.PACKAGE_DEFINITION_ID
WHERE DE.XML_DEFINITION_DATA like '%Maven%'
AND DE.XML_DEFINITION_DATA like '%JDK 1.8%'
ORDER BY 1, 2, 3;
In the WHERE clause, you can add more filters or edit the existing ones according to your needs.
The query above was tested on PostgreSQL, adjustments might be needed to use it on a different DBMS.