Bamboo apps (plugins) usage report for build and deployment tasks
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
It is important to have certain control over what apps are being used in Bamboo, either from a technical, security and even a financial perspective.
Bamboo has the ability to provide certain information directly from the database that would report its apps (plugin) usage.
Environment
Bamboo connected to an external database.
Solution
The SQL selects provided above will not show information from non-task related apps. For non-task apps, we recommend you open a Support ticket or in case the app is not supported by Atlassian, get in touch with the vendor for more details.
The following SQL select statements provide some numbers related to used apps used by build and deployment tasks. Network traffic accounting is not implemented natively and is something that needs to be implemented at the app level, so far we haven't seen any app that records that information. If you require such information we recommend you reach out to your app vendor for more information.
The provided queries are in PostgreSQL format, you may have to adapt them to your database.
SELECT innertable.*,
Max(brs.build_completed_date) AS last_run_date
FROM (
SELECT DISTINCT Array_to_string(Regexp_matches(bd.xml_definition_data,'<pluginKey>(.*?)</pluginKey>','g'), ';') AS plugin,
b.full_key AS fullkey
FROM build_definition AS bd
JOIN build AS b
ON b.build_id = bd.build_id ) AS innertable,
buildresultsummary brs
WHERE innertable.plugin != ''
AND brs.build_key = innertable.fullkey
GROUP BY (innertable.plugin, innertable.fullkey)
ORDER BY fullkey;
SELECT innertable.plugin,
innertable.environmentname,
innertable."name",
Max(dr.finished_date) as last_run_date
FROM (
SELECT DISTINCT Array_to_string(Regexp_matches(de.xml_definition_data,'<pluginKey>(.*?)</pluginKey>','g'), ';') AS plugin,
de."name" AS environmentname,
dp."name",
de.environment_id
FROM deployment_environment AS de
JOIN deployment_project AS dp
ON de.package_definition_id = dp.deployment_project_id ) AS innertable,
deployment_result dr
WHERE innertable.plugin != ''
AND innertable.environment_id = dr.environment_id
GROUP BY (innertable.plugin, innertable.environmentname, innertable."name")
ORDER BY name, environmentname;