This page describes how to configure a script executable for a Task. When creating a new Job or configuring an existing one, you need to specify the Tasks that will execute the Job's builds. You must specify an executable for each Task. If you specify an Ant, Grails or Maven executable, you will also need to choose a JDK. When creating a new Plan, you can configure the Tasks for the Plan's default Job. An executable is a program external to Bamboo used to automate processes. Generally, executables compile source code to generate compiled executable files (referred to as artifacts in Bamboo). Ant, Maven, MSBuild or PHPUnit are just some examples of executables that can be used as part of your build process.New executables can be defined as capabilities in Bamboo. Once an executable has been defined in Bamboo, it can be configured as part of a Task. |
On this page: |
Configuring a Script Executable for a Task
To configure a script builder for a Task:
- Navigate to the Task configuration for the Job (this will be the default Job if creating a new Plan).
- Click the name desired Task or click 'Add Task' if creating a new Task.
- In the 'Executable' dropdown, select the script executable that you wish to configure for this plan (e.g. "Script1"). The executable that you select will become one of the Task's capability requirements (and hence, one of the Job's requirements). For details, please see Configuring a Job's Requirements.
- The screen will refresh to display the settings specific to script executables:
- 'Script location' — Select the location of the script file.
- If you selected 'File', enter the location of the file in the 'Script file' field. This can be either relative to the repository root of the plan, or absolute. You can include variables (see Using Global, Plan or Build-specific Variables).
- If you selected 'Inline', enter the script in the 'Script body' field.
- 'Argument' — Specify the relevant argument to pass to the script. Note that arguments which contain spaces must be quoted. You can include variables (see Using Global, Plan or Build-specific Variables).
- 'Script location' — Select the location of the script file.
- If required, update the system environment variables and working directory settings:
- 'Environment Variables' (Optional) — Specify any additional* operating system environment variables you want to pass to your build; Please note, multiple variables must be separated with spaces, and parameters with spaces must be quoted (e.g 'ANT_OPTS=-Xms200m -Xmx700m'). You can also include Bamboo global or build-specific variables (see Using Global, Plan or Build-specific Variables).
* i.e. additional to the existing environment variables (see Viewing Bamboo's System Information for a list). Note that existing environment variables are automatically available to the executable, thus you don't need to specify them in the 'System Environment Variables' field. - 'Working Sub Directory' (Optional) — A subdirectory relative to the Job build's root directory where Bamboo will execute your specified executable's commands. The Job build's root directory contains everything checked out from your Job's configured source repository. If you leave this field blank, Bamboo will look for the build files in the build root directory (which is assumed to be the Working Directory, as described in Locating Important Directories and Files). This option is useful, if your Task has a build script in a subdirectory and the executable needs to be run from within that subdirectory, in which case, you would type the name of that subdirectory in this field.
- 'Environment Variables' (Optional) — Specify any additional* operating system environment variables you want to pass to your build; Please note, multiple variables must be separated with spaces, and parameters with spaces must be quoted (e.g 'ANT_OPTS=-Xms200m -Xmx700m'). You can also include Bamboo global or build-specific variables (see Using Global, Plan or Build-specific Variables).
- Click the 'Save' button to save your changes.
Notes
Related Topics
Attachments:


