This documentation relates to an earlier version of Bamboo.
View

Unknown macro: {spacejump}

or visit the current documentation home.

A builder is a software compiler program external to Bamboo. Bamboo supports multiple builders. Once a builder is defined in the Bamboo system, it can then be specified in build plans by a Bamboo administrator.

One builder (Maven) is automatically configured when you install Bamboo. You can add more builders of different types as described in 2.2 Configuring a new Builder. Once added, they will appear in the 'Builder' field as described below.

To specify a plan's builder and build resources,

(info) If you are creating a new plan, start at step 5.

  1. Click 'Home' to go to the Dashboard.
  2. Click the 'All Plans' tab.
  3. Locate the plan in the list and click this icon:
  4. The 'Configuration' tab will be displayed. Click the 'Builder Configuration' sub-tab.
  5. The 'Builder Configuration' sub-tab will be displayed (see screenshot below).
  6. In the 'Builder' field, select the builder which Bamboo will use to build this plan. The following fields will vary depending on what type of Builder you select:
    • Ant:
      • 'Build File' — (Optional) Type the relevant filename (e.g. build.xml). You can include variables (see 2.1.1 Using Variables).
      • 'Target' — Specify the Ant target you want Bamboo to execute each time the source code changes. For example: test (this will run the Ant target 'test'). You can also use '-D' to define one or more JVM parameters, e.g.: -Djava.awt.headless=true (this will pass the parameter 'java.awt.headless' with a value of 'true'). You can also include variables (see 2.1.1 Using Variables).
    • Maven:
      • 'Goal' — Specify the Maven goal you want Bamboo to execute each time the source code changes. For example: clean test(this will run the Maven goal 'clean' followed by the Maven goal 'test'). You can also use '-D' to define one or more JVM parameters, e.g.: -Djava.awt.headless=true (this will pass the parameter 'java.awt.headless' with a value of 'true'). You can also include variables (see 2.1.1 Using Variables).
    • Custom command:
      • 'Argument' — Specify the relevant argument to pass to the command. Note that arguments which contain spaces must be quoted. You can include variables (see 2.1.1 Using Variables).
    • Script:
      • 'Script' — Specify the location of the script file. This can be either relative to the repository root of the plan, or absolute. You can include variables (see 2.1.1 Using Variables).
      • 'Argument' — Specify the relevant argument to pass to the script. Note that arguments which contain spaces must be quoted. You can include variables (see 2.1.1 Using Variables).
  7. 'Build JDK' — If you selected an Ant or Maven builder above, you will need to choose a JDK from the list.
    (info) To define a new JDK in your Bamboo system, please see 2.3 Configuring a new JDK.
  8. 'System Environment Variables' — (Optional) Specify any additional* operating system environment variables you want to pass to your build (e.g. ANT_HOME=/tools/ant); use spaces to separate multiple variables. You can also include Bamboo global or build-specific variables (see 2.1.1 Using Variables).
    * i.e. additional to the existing environment variables (see 8.1 Viewing Bamboo's System Information for a list). Note that existing environment variables are automatically available to the builder, i.e. you don't need to specify them in the 'System Environment Variables' field.
  9. 'Working Sub Directory' — (Optional) If you leave this field blank, Bamboo will look for the build files in the build root directory (which is assumed to be the build's Working Directory, as described in 7.1 Locating Important Directories and Files). You can override this option by specifying an alternative working directory (which must be a subdirectory of the root directory). For example, if your plan has a build script in a subdirectory, and the script needs to be run from within that subdirectory, you would type the name of that subdirectory in the 'Working Sub Directory' field.
  10. 'The build has tests' — Select this check-box if you want Bamboo to gather test results data for each build result. (Note that Bamboo requires test results to be XML files that are compatible with JUnit XML format) Choose one of the following:
    • 'Test Results Directory' — Select this option if Bamboo should look in the Builder's standard test results directory.
    • 'Specify custom results directories' — Select this option if the Builder will place generated test results in an alternative directory. The following field will appear:
      • 'Specify custom results directories' — Type the name of the test results directory (or multiple directories, separated by commas). You can also use Ant-style patterns such as */test-reports/.xml. Please specify file path relative to your plan's root directory (e.g /home/bamboouser/bamboo-home/xml-data/build-dir/MY_PLAN/), i.e. please do not specify an absolute path.
  11. 'Clover output will be produced' — Select this check-box if you are running Atlassian Clover and want to view its code-coverage data from within Bamboo (see 3.7 Viewing the Clover Code-Coverage for a Build Result). The following field will be displayed:
    • 'Clover XML Directory' — Specify the name of the directory (including path) where Bamboo will look for the XML report output file from Clover. Please specify file path relative to your plan's root directory (e.g /home/bamboouser/bamboo-home/xml-data/build-dir/MY_PLAN/), i.e. please do not specify an absolute path.
  12. Click the 'Save' button if you are editing an existing plan; or if you are creating a new plan, click the 'Next' button and go to 1.8 Specifying a Plan's Build Artifacts.


Screenshot: 'Builder Configuration' 




RELATED TOPICS











Bamboo Documentation