ジョブの要件の設定

このページの内容

お困りですか?

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

コミュニティに質問

このページでは、ジョブの要件を設定する方法について説明します。

要件は、ジョブまたはタスクで指定されます。要件は、エージェントがジョブまたはタスクをビルドするうえで必要とする機能を指定するものです。ジョブは、そのタスクで指定されたすべての要件を継承します。

機能と要件の組み合わせによって、どのエージェントが特定のジョブのビルドを実行できるかが決まります。各ジョブは、それぞれのジョブの要件に一致する機能を持つエージェントだけがビルドできます。

Bamboo には、ジョブやタスクの要件によって指定できる 4 種類の機能があります。

  • Executable capabilities — Define external programs that can be called by Bamboo, for example AntMavenMSBuild or PHPUnit. See Defining a new executable capability.
  • JDK 機能 — ジョブまたはタスクで使用する JDK バージョンを定義します。「新しい JDK 機能を定義する」を参照してください。
  • バージョン管理機能 — Bamboo でのソース コードのチェックアウトに使用する VCS クライアント アプリを指定します。「新しいバージョン管理機能を定義する」を参照してください。
  • カスタム機能 — 特定のエージェントがどのジョブをビルドするかを制御するために使用します。たとえば、特定のジョブのビルドを Windows 環境でのみ実行する必要がある場合、適切なエージェント用のカスタム機能「operating.system=WindowsXP」を作成し、このジョブの要件として指定できます。「新しいカスタム機能を定義する」を参照してください。

ジョブの要件を指定する前に、まず Bamboo システムでその機能を定義する必要があります。

ジョブの追加要件を指定する

既定では、ジョブはそのタスクの要件を継承します。ただし、ジョブには、そのタスクの要件に加えて、追加要件を指定することもできます。


ジョブの追加要件を指定するには、次の手順に従います。

  1. ジョブの設定」の説明に従って、目的のジョブの設定ページに移動します。
  2. Select the Requirements tab (see screenshot below). This page shows a list of all the job's current requirements and the number of Agents and Images (i.e. agents/elastic images which meet the job's requirements and can run a build for this job). See Viewing current capable agents below for more information.
  3. Search for a capability and select a requirement from the list.
  4. リストから要件の値を選択します。
    • exists (存在する) — このジョブは、同じキーを持つ機能を備えたすべてのエージェントがビルドできます。
    • equals (等しい) — このジョブは、同じキーと値を持つ機能を備えたすべてのエージェントがビルドできます。
    • matches — this job can be built by any agent that has a capability with the same key, and the value matches the regular expression. For more information about regular expressions, see Oracle's tutorial on regular expressions.
  5. Select Add. The numbers of Agents and Images will be updated, as the plan can now only be built by agents with capabilities that meet the new custom requirement you have specified.

Job requirements configuration screen

現在対応可能なエージェントを表示する

現在ジョブをビルドできるエージェントまたはエラスティック イメージの詳細を表示するには、次の手順に従います。

  1. On the job's Requirements tab (described above), select the name of the requirement in the table (e.g. MySQL).
  2. The summary page for the capability will be displayed, showing the agents and images that have the capability. See Viewing a capability's agents and jobs for more information.
最終更新日 2021 年 5 月 31 日

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

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