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.
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, click Add Capability. The 'Add Capability' page is displayed.
- Choose 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. - 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.
Before you begin:
To define a new local server executable capability:
Click the
icon in the Bamboo header and choose
Overview.
- Click Server Capabilities in the left navigation panel.
- Choose 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. - Click 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:
Click the
icon in the Bamboo header and choose
Overview.
- Click Agents in the left navigation panel.
- In the 'Remote Agents' section, click Shared Remote Capabilities at the right.
- Choose 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. - Click 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 (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.