このページでは、ジョブの要件を設定する方法について説明します。
A requirement is specified in a job or a task. A requirement specifies a capability that an agent must have for it to build that job or task. A job inherits all of the requirements specified in its tasks.Together, capabilities and requirements control which agents can execute builds for particular jobs. Each job can only be built by agents whose capabilities match the job's requirements.
There are four types of capabilities in Bamboo:
- Executable capability — Every task has one 'Executable' requirement. A job inherits the 'Executable' requirements of its tasks.
- JDK capability — A task has either one 'JDK' requirement or none, depending on the task's 'Executable'. A job inherits the 'JDK' requirements of its tasks.
- Custom capability — A job can have multiple 'custom' requirements (or none). Before you can specify a custom requirement in your job, you must first define that custom requirement in your Bamboo system (see Configuring a new custom capability). Custom capabilities can be used to control which jobs will be built by a particular agent. For example, if the builds for a particular job should only run in a Windows environment, you could create a custom capability '
operating.system=WindowsXP' for the appropriate agent(s), and specify it as a requirement for this job. - Perforce capability — A job will have a 'Perforce' requirement automatically specified, if Perforce was selected as the source repository.
A job's will inherit the requirements of its tasks by default. However, you can specify extra requirements for the job, in addition to the task requirements.
ジョブの追加要件を指定するには、次の手順に従います。
- Navigate to the desired job's configuration pages, as described on Editing a job.
- Click the Requirements tab (see screenshot below). This page shows a list of all the job's current requirements and the number of 'Matching Agents' and 'Matching 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.
- If you have previously set up an agent capability, you can select it from the Requirement list in the 'Add Extra Requirement' section. If you are setting up a new custom requirement, select New custom requirement from that list instead.
- 要件のフォームに次の情報を入力します。
- Key (キー) (新しいカスタム要件のみ) — 新しい機能のキーを入力します。
- リストから要件の値を選択します。
- [Add (追加)] をクリックします。指定した新しいカスタム要件を満たす機能を備えたエージェントのみがプランをビルドできるようになったため、「一致するエージェント」と「一致するイメージ」の数が更新されます。
スクリーンショット: ジョブの要件の指定

現在対応可能なエージェントを表示する
現在ジョブをビルドできるエージェントまたはエラスティック イメージの詳細を表示するには、次の手順に従います。
- On the job's Requirements tab (described above), click the name of the requirement in the table (e.g. 'Maven 2').
- The summary page for the capability will be displayed, showing the agents and elastic images that have the capability. See Viewing a capability's agents and jobs for more information.