Defining a new executable capability

An executable is an external program that Bamboo uses during the build process. Bamboo supports the following executables:

  • Ant
  • Maven
  • Grails
  • NAnt
  • devenv.com
  • msbuild.exe
  • PHPUnit
  • Custom command (e.g. 'make')
  • script

このページの内容:

Executables must be defined as capabilities (that is, 'registered') in Bamboo before they can be used by tasks in a Bamboo job. At least one capability was automatically defined when you installed Bamboo, but you can define additional capabilities for other executables. 

You can define an executable capability that is:

  • for a specific local or remote agent 
  • shared by all local agents
  • shared by all remote agents.
Once you have defined a new executable capability in your Bamboo system, its label (e.g. 'Ant') will appear in the Executable list when you use the executable in a task (see Configuring tasks). The executable you select will be used every time the task is run during a build. That is, the task can only be run by agents which have a capability that matches the executable specified in the task's Executable list.

Note that agent-specific capabilities override any shared capability of the same name.

Defining an agent-specific executable capability

An agent-specific capability applies to one agent only. Note that the value of an agent-specific capability will override the value of a shared capability of the same name (if one exists).

To define a new agent-specific executable capability:

  1. Navigate to the desired agent.
  2. In the 'Agent-Specific Capabilities' section of the Capabilities tab, click Add Capability. The 'Add Capability' page is displayed.
  3. Choose Capability Type > Executable.
  4. Select the appropriate executable from the Type list.
  5. In the Executable Label, type a name/label for the executable. Bamboo uses this name in the Executables list whenever a task's executable is configured.
  6. In the Path field, type the path to the installed executable. This will vary depending on the Type you selected in the previous step. 
    (info) For Ant and Maven, Bamboo requires the path to be the location of the executable installation folder.
  7. Click Add. This will verify whether the executable and path you have specified are valid.

Defining a local server executable capability

Local server capabilities are inherited by all local agents. This means that local agents can all make use of the executables installed on the Bamboo server machine.

始める前に

To define a new local server executable capability:

  1. Click the  icon in the Bamboo header and choose  Overview.
  2. Click Server Capabilities in the left navigation panel.
  3. Choose Capability Type > Executable in the 'Add Capability' section at the end of the page.
  4. Select the appropriate type of executable from the Type list.
  5. In the Executable Label field, type a name/label for the executable, which Bamboo presents in the Executable list whenever a Task's executable is configured.
  6. In the Path field, type the appropriate path. This will depend on the Type you selected in the previous step.
    Note that for Ant and Maven, Bamboo requires the path to be the location of the executable installation folder.
  7. 追加をクリックします。

Defining a shared remote executable capability

Shared remote capabilities are inherited by all remote agents. However, Bamboo remote agents inherit only the paths of the shared executable capabilities, not the actual executable files. This means that every time you define a capability for an agent, you must make sure that the executable (for example, Ant or Maven) has actually been installed in that location on the remote server on which the remote agent will run.

Note that the value of a shared capability will be overridden by the value of an agent-specific capability of the same name (if one exists).

Shared remote executable capabilities are not shared with elastic agents.

To define a shared remote executable capability:

  1. Click the  icon in the Bamboo header and choose  Overview.
  2. Click Agents in the left navigation panel.
  3. In the 'Remote Agents' section, click Shared Remote Capabilities at the right.
  4. Choose Capability Type > Executable in the 'Add Capability' section.
  5. Select the appropriate type of executable from the Type list.
  6. In the Executable Label field, type a name/label to help you identify this executable.
  7. In the Path field, type the appropriate path. This will depend on the Type you selected in the previous step.
    Note that for Ant and Maven, Bamboo requires the path to be the location of the executable installation folder.
  8. 追加をクリックします。

注意

  • Pre-defined executables — The executable that was automatically defined when you installed Bamboo depends on the system environment variables (e.g. 'ANT_HOME=/opt/java/ant') that were present on the machine that Bamboo was installed on.
    • On the Bamboo server, environment variables that were present during installation were saved as local server capabilities in Bamboo.
    • On remote agents, environment variables that were present during installation were saved as agent-specific capabilities in Bamboo.
  • Using other executables – If you need to use an executable that is not natively supported by Bamboo, a number of third-party plugin modules are available (e.g. NoseXUnit). You can also create your own executable plugin (see the Bamboo Plugin Guide for details).
  • msbuild.exe — You will need to install the .NET framework SDK and reference the default path for msbuild.exe, (e.g. C:\Windows\Microsoft.NET\Framework*64*\v2.0.50727), to use this executable.
  • PHPUnit — You will need to install PHPUnit and reference the path to your PHP command-line interpreter, (e.g. /usr/bin/phpunit on Ubuntu), to use this executable.
最終更新日 2017 年 8 月 30 日

この翻訳に満足しましたか?

はい
いいえ
この記事についてのフィードバックを送信する

お探しの情報が見つかりませんか?

コミュニティへの質問

Powered by Confluence and Scroll Viewport.