This is the documentation for Bamboo 5.6. View this page for the

Unknown macro: {spacejump}

of Bamboo, or visit the latest Bamboo documentation.

Bamboo でジョブを構築する際に JDK を利用するには、あらかじめ JDK をインストールし、Bamboo で機能として定義する必要があります。

At least one JDK was automatically defined when you installed Bamboo. You can define additional JDK capabilities that are:

  • for a specific local or remote agent 
  • shared by all local agents
  • shared by all remote agents.

On this page:

Once you have defined a new JDK capability in your Bamboo system, its label (e.g. '1.5') will appear in the Build JDK list when you configure a job's builder (see Configuring tasks). The JDK you select will be used for every one of that job's builds. That is, the job can only be built by agents which have a JDK capability whose label is specified in the job's Build JDK field.

(info) エージェントが独自の JDK 機能を持っている場合、その値は同じ名前の共有 JDK 機能 (存在する場合) の値よりも優先されることにご注意ください。

Defining an agent-specific JDK capability

新しいエージェント固有の JDK 機能を定義するには、次の手順に従います。

  1. Navigate to the desired agent, as described on Viewing a Bamboo agent's details.
  2. Click the Capabilities tab.
  3. Click Add Capability (under 'Agent-Specific Capabilities').
  4. Choose Capability Type JDK.
  5. In the JDK Label field, type a name/label for the JDK. Bamboo show this in the Build JDK list whenever a job's builder is configured.
  6. [Java ホーム] フィールドに、JDK ホーム ディレクトリの場所を入力します。
  7. [追加] をクリックします。

ローカル サーバーの JDK 機能の定義する

ローカル サーバーの機能はすべてのローカル エージェントに継承されます。

新しいローカル サーバーの JDK 機能を定義するには、次の手順に従います。

  1. Click the  icon and select Overview.
  2. 左側のナビゲーション パネルで [サーバー機能] をクリックします。
  3. ページの最後にある [Add Capability (機能を追加)] セクションで、[Capability Type (機能タイプ)] > [JDK] の順に選択します。
  4. In the JDK Label field, type a name/label for the JDK. Bamboo displays this in the Build JDK list whenever a job's builder is configured.
  5. [Java ホーム] フィールドに、JDK ホーム ディレクトリの場所を入力します。
  6. [追加] をクリックします。

共有リモート JDK 機能を定義する

Shared remote JDK capabilities are not shared with elastic agents.

新しい共有リモート JDK 機能を定義するには、次の手順に従います。

  1. Click the  icon and select Overview.
  2. 左側のナビゲーション パネルの [Agents (エージェント)] をクリックします。
  3. [リモート エージェント] セクションで、右側の [共有リモート機能] をクリックします。
  4. Choose Capability Type > JDK in the 'Add Capability' section at the end of the page (see screenshot below).
  5. In the JDK Label field, type a name/label for the JDK. Bamboo Bamboo displays this in the Build JDK list whenever a job's builder is configured.
  6. [Java ホーム] フィールドに、JDK ホーム ディレクトリの場所を入力します。
  7. [追加] をクリックします。

注意

  • Configuring generic JDK capabilities — If you want to indicate that an agent is capable of running builds for a set of related JDKs (e.g. all point versions of JDK 1.5), you set up generic JDK capabilities to encompass these JDKs.
    For example, you can set up the following JDK capabilities for your Bamboo agent(s):
    • JDK ([JDK ラベル] =「JDK」および [Java ホーム] =「/usr/java/jdk1.5.0_07」) - この JDK 機能は、エージェントが任意の JDK 要件でビルドを実行できることを示しています。
    • JDK 1.5 ([JDK ラベル] =「JDK 1.5」および [Java ホーム] =「/usr/java/jdk1.5.0_07」) - この JDK 機能は、エージェントが JDK 1.5 要件または JDK 1.5 の任意のポイント バージョン (1.5.0_07、1.5.0_08 など) でビルドを実行できることを示しています。
    • JDK 1.5.0_07 ([JDK ラベル] =「JDK 1.5.0_07」および [Java ホーム] =「/usr/java/jdk1.5.0_07」) - この JDK 機能は、エージェントが JDK 1.5.0_07 要件でのみビルドを実行できることを示しています。
  • If you wish to find redundant JDK capabilities, you can view the list of JDK capabilities set up in Bamboo and delete any unwanted JDK capabilities.
     
  • 自動定義機能 - これは、Bamboo がインストールされたマシンに存在していたシステム環境変数 (JAVA_HOME=/opt/java/java_sdk1.5 など) によって異なります。
    • Bamboo Server では、インストール時に存在していた環境変数は、Bamboo に共有のローカル機能として保存されていたものです。
    • リモート エージェントでは、インストール時に存在していた環境変数は、Bamboo にエージェント固有の機能として保存されていたものです。