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.

(warning) 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 ProjectKeyProjectTitleFullKeyBuildTypeBuildTitle, and CreationDate of where the variable was used.

Query #2 to get where was defined for a Deployment.

(warning) Please replace the TestVariable with the name of your variable.

SELECT NAME,
       DESCRIPTION
FROM   DEPLOYMENT_ENVIRONMENT DE
WHERE  DE.XML_DEFINITION_DATA LIKE '%TestVariable%'; 

(info) Please note this query has been tested in PostgreSQL DB and might require changes for other DB types. 

最終更新日 2023 年 7 月 28 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.