Bamboo apps (plugins) usage report for build and deployment tasks
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
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.
*Fisheye および Crucible は除く
本記事で説明している手順は、現時点でのものとなります。そのため、一部のお客様で特定の状況下で動作したという報告がありますが、正式にサポートされているわけではなく、お客様の特定のシナリオで動作することを保証するものではありません。
本番環境での実施の前に一通り非本番環境で検証し、成功しなかった場合にはサポートされている代替案にフォール バックしてください。
要約
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.
環境
Bamboo connected to an external database.
ソリューション
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;