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:

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.

On this page:


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, select Add capability.
  3. Select 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. Select Add. This will verify whether the executable and path you have specified are valid.

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. Go to cogwheel icon > Build resources > Agents Shared remote capabilities.
  2. Select Capability type > Executable in the Add capability section.
  3. Select the appropriate type of executable from the Type list.
  4. In the Executable label field, type a name/label to help you identify this executable.
  5. 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.
  6. Select Add.

Notes

  • 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. 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.
Last modified on Mar 5, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.