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
On this page:
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.
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:
- Navigate to the desired agent.
- In the Agent-specific capabilities section of the Capabilities tab, select Add capability.
- Select Capability type > Executable.
- Select the appropriate executable from the Type list.
- 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.
- In the Path field, type the path to the installed executable. This will vary depending on the Type you selected in the previous step.
For Ant and Maven, Bamboo requires the path to be the location of the executable installation folder. - Select 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.
Before you begin:
- If you want to run multiple Maven agents on your local server, you will need to configure repository isolation for your Maven executables. See Configuring repository isolation for Maven executables for details.
To define a new local server executable capability:
- Go to > Build resources > Server capabilities.
- Select Capability type > Executable in the Add capability section at the end of the page.
- Select the appropriate type of executable from the Type list.
- 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.
- 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. - Select Add.
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:
- Go to > Build resources > Agents > Shared remote capabilities.
- Select Capability type > Executable in the Add capability section.
- Select the appropriate type of executable from the Type list.
- In the Executable label field, type a name/label to help you identify this executable.
- 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. - 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.