How to check which plugins are being used by Bamboo plans

Still need help?

The Atlassian Community is here for you.

Ask the community

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

As some Bamboo instances use many plugins, it is hard to identify which plugin is being used in each plan. In order for us to identify which project/plan is using a specific plugin, we would need to check the data against the database.

Environment

All supported Bamboo versions, with plugins installed.

Solution

In the database, there's the BUILD table that has a column called XML_DEFINITION_DATA with lots of information in which the plugins are listed.

The queries below were tested against a MySQL and Postgres database. If you use a different database management system, you’ll need to translate the query above into your DBMS’s syntax.

Some of the queries below may fail due to malformed XML data. Please refer to this issue for a workaround: BAM-22073 - Getting issue details... STATUS

  • The plugin Information is inside the XML_DEFINITION_DATA, the SQL query will list which Bamboo plan of what project uses which plugin:
MySQL
SELECT * FROM ( SELECT P.TITLE AS PROJECT,
       B.TITLE AS PLAN_KEY,
       B.BUILD_TYPE AS BUILD_TYPE,
       EXTRACTVALUE(BD.XML_DEFINITION_DATA, '//pluginKey/text()') AS PLUGIN_KEY
FROM BUILD B
JOIN BUILD_DEFINITION BD ON B.BUILD_ID = BD.BUILD_ID
JOIN PROJECT P ON B.PROJECT_ID = P.PROJECT_ID ) AS PLUGIN_USAGE
WHERE ( PLUGIN_KEY IS NOT NULL AND PLUGIN_KEY <> '' )
ORDER BY PROJECT, BUILD_TYPE, PLAN_KEY
Postgres
SELECT P.TITLE AS PROJECT,
       B.TITLE AS PLAN_KEY,
       B.BUILD_TYPE AS BUILD_TYPE,
       CAST(UNNEST(XPATH('//pluginKey/text()', BD.XML_DEFINITION_DATA::XML)) AS VARCHAR) AS PLUGIN_KEY
FROM BUILD B
JOIN BUILD_DEFINITION BD ON B.BUILD_ID = BD.BUILD_ID
JOIN PROJECT P ON B.PROJECT_ID = P.PROJECT_ID
ORDER BY PROJECT, BUILD_TYPE, PLAN_KEY
MSSQL Server
SELECT DISTINCT
    b.FULL_KEY AS fullkey,
    CAST( REPLACE(CAST(XML_DEFINITION_DATA AS VARCHAR(MAX)), 'encoding="UTF-8"', 'encoding="utf-8"'
    ) AS XML).value('(//*:configuration//*:pluginKey)[1]', 'varchar(max)') AS PLUGIN_KEY
FROM
    BUILD_DEFINITION AS bd
JOIN
    BUILD AS b
ON
    b.BUILD_ID = bd.BUILD_ID



  • If you know the plugin’s keyword, the query below can be used to return just the plan using that plugin.
MySQL
SELECT * FROM (SELECT P.TITLE AS PROJECT,
       B.FULL_KEY AS PLAN_KEY,
       B.BUILD_TYPE AS BUILD_TYPE,
       EXTRACTVALUE(BD.XML_DEFINITION_DATA, '//pluginKey/text()') AS PLUGIN_KEY
FROM BUILD B
JOIN BUILD_DEFINITION BD ON B.BUILD_ID = BD.BUILD_ID
JOIN PROJECT P ON B.PROJECT_ID = P.PROJECT_ID) AS PLUGIN_USAGE
WHERE PLUGIN_KEY LIKE ('%plugin keyword%')
ORDER BY PROJECT, BUILD_TYPE, PLAN_KEY
Postgres
SELECT * FROM (SELECT P.TITLE AS PROJECT,
       B.TITLE AS PLAN_KEY,
       B.BUILD_TYPE AS BUILD_TYPE,
       CAST(UNNEST(XPATH('//pluginKey/text()', BD.XML_DEFINITION_DATA::XML)) AS VARCHAR) AS PLUGIN_KEY
FROM BUILD B
JOIN BUILD_DEFINITION BD ON B.BUILD_ID = BD.BUILD_ID
JOIN PROJECT P ON B.PROJECT_ID = P.PROJECT_ID ) AS PLUGIN_USAGE
WHERE PLUGIN_KEY LIKE ('%plugin keyword%')
ORDER BY PROJECT, BUILD_TYPE, PLAN_KEY
MS SQL Server
SELECT P.TITLE AS PROJECT,
       B.TITLE AS PLAN_KEY,
       B.BUILD_TYPE AS BUILD_TYPE       
FROM BUILD B
JOIN BUILD_DEFINITION BD ON B.BUILD_ID = BD.BUILD_ID
JOIN PROJECT P ON B.PROJECT_ID = P.PROJECT_ID
WHERE BD.XML_DEFINITION_DATA LIKE '%plugin keyword%'
ORDER BY PROJECT, BUILD_TYPE, PLAN_KEY

Replace the "plugin keyword" with the keyword of the plugin.

The keyword for the plugin can also be found under the application-properties folder > application.xml file when a Support Zip file is created. For example, Inside the application.xml file, we have listed all plugins installed in Bamboo. The plugin below is the "Atlassian Troubleshooting and Support Tools" and the keyword is plugin-bamboo.

    <plugin>
      <key>com.atlassian.troubleshooting.plugin-bamboo</key>
      <name>Atlassian Troubleshooting and Support Tools</name>
      <version>1.34.3</version>
      <vendor>Atlassian</vendor>
      <status>ENABLED</status>
      <vendor-url>https://atlassian.com</vendor-url>
      <framework-version>2</framework-version>
      <bundled>Bundled</bundled>
    </plugin>
Last modified on Aug 24, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.