Query to fetch Dedicated agent details, Agent capabilities, Job requirement and Plans having artifactory plugins tasks.

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Server* 製品のサポートは 2024 年 2 月 15 日をもって終了します。Server 製品を利用している場合は、Atlassian Server のサポート終了のお知らせページにて移行オプションをご確認ください。

*Fisheye および Crucible は除く

本記事で説明している手順は、現時点でのものとなります。そのため、一部のお客様で特定の状況下で動作したという報告がありますが、正式にサポートされているわけではなく、お客様の特定のシナリオで動作することを保証するものではありません。

本番環境での実施の前に一通り非本番環境で検証し、成功しなかった場合にはサポートされている代替案にフォール バックしてください。

また、アトラシアン サポートのサポート対象外のご質問の場合には、Community もご活用ください。

要約

This article provides SQL queries to retrieve the following items:

  • All dedicated agents and which build_type  they are dedicated to.
  • Details of executable types ( Plans and Jobs ) and which dedicated agent these are linked to.
  • All jobs and their requirements set.
  • All agents and their capabilities set.
  • Which plans have an Artifactory Plugin task configured. 

環境

Tested on Bamboo 8.1.2 with PostgreSQL.

ソリューション

  • SQL to list all the dedicated agents in the Bamboo and for which build type they are dedicated.

    SELECT aa.executable_id,
           aa.executable_type,
           q.agent_type,
           q.title AS dedicated_agentname
     FROM  agent_assignment aa 
     JOIN queue q ON q.queue_id = aa.executor_id; 
  • SQL to list details of the executable_type(Plan & Job) and which agent it is dedicated to.

    SELECT aa.executable_type AS build_type,
           b.full_key         AS full_key,
           b.title,
           q.agent_type,
           q.title            AS dedicated_agentname
    FROM   agent_assignment aa
           JOIN build b ON aa.executable_id = b.build_id
           JOIN queue q ON q.queue_id = aa.executor_id
    ORDER  BY b.title;
  • SQL to list all jobs and their requirements set.

    SELECT b.build_type,
           b.full_key,
           b.title,
           r.key_identifier AS requirement_type
    FROM   build b
           JOIN requirement_set rs ON b.requirement_set = rs.requirement_set_id
           JOIN requirement r ON r.requirement_set = rs.requirement_set_id
    ORDER  BY b.full_key; 
  • SQL to list all agents and their capabilities set.

    SELECT q.agent_type,
           q.title,
           c.key_identifier,
           c.value
    FROM   queue q
           JOIN capability_set cs ON q.capability_set = cs.capability_set_id
           JOIN capability c ON cs.capability_set_id = c.capability_set
    ORDER  BY q.title; 
  • SQL to get details of which plans have an Artifactory Plugin task configured.

    SELECT b.build_type,
           b.full_key,
           b.buildkey  AS plankey,
           b.title     AS plan_name,
           b1.build_type,
           b1.full_key,
           b1.buildkey AS jobkey,
           b1.title    AS job_name
    FROM   build b,
           build b1,
           build_definition bd,
           chain_stage cs
    WHERE  b1.build_id = bd.build_id
           AND bd.xml_definition_data LIKE '%bamboo-artifactory-plugin%'
           AND b1.stage_id = cs.stage_id
           AND cs.build_id = b.build_id
    ORDER  BY b.full_key;  




最終更新日 2022 年 7 月 27 日

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

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