How to generate report in Bamboo to get the builds and deployments where a specific global variable was used.
プラットフォームについて: 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 は除く
要約
The purpose of this page is to generate a report using DB queries that would display a list of builds and deployment jobs where a specific global variable is being used.
環境
All supported versions of Bamboo
ソリューション
Query #1 to get where was defined for a Plan.
Please replace the TestVariable with the name of your variable.
SELECT P.PROJECT_KEY,
P.TITLE,
B.FULL_KEY,
B.BUILD_TYPE,
B.TITLE,
B.CREATED_DATE
FROM BUILD_DEFINITION BD
INNER JOIN BUILD B
ON B.BUILD_ID = BD.BUILD_ID
INNER JOIN PROJECT P
ON P.PROJECT_ID = B.PROJECT_ID
WHERE BD.XML_DEFINITION_DATA LIKE '%TestVariable%';
This is going to list the ProjectKey, ProjectTitle, FullKey, BuildType, BuildTitle, and CreationDate of where the variable was used.
Query #2 to get where was defined for a Deployment.
Please replace the TestVariable with the name of your variable.
SELECT NAME,
DESCRIPTION
FROM DEPLOYMENT_ENVIRONMENT DE
WHERE DE.XML_DEFINITION_DATA LIKE '%TestVariable%';
Please note this query has been tested in PostgreSQL DB and might require changes for other DB types.