This documentation relates to an earlier version of Bamboo.
View

Unknown macro: {spacejump}

or visit the current documentation home.

When you configure a plan, you need to specify which builder should be used for the plan's builds. If you specify a Maven builder, you will also need to choose a JDK.

To configure a Maven builder for a plan,

(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' sub-tab.
  5. The 'Builder' sub-tab will be displayed.
  6. In the 'Builder' field, select the Maven builder that you wish to configure for this plan (e.g. "Maven 2"). The builder that you select will become one of the plan's capability requirements. For details please see Specifying a Plan's Capability Requirements.
    (tick) Tip: If you want to configure a new shared local builder capability in Bamboo, you can do so by clicking the 'Add New Builder' link and entering the builder details in the window that displays. Once you have added the new builder, it will be available for you to select from the 'Builder' dropdown.
  7. The screen will refresh to display the builder settings specific to Maven:
    • 'Project File' (Optional) — Enter the path to your Maven 2 project file, relative to the working sub directory specified (below). If you do not specify this, Maven 2 will use the pom.xml in the root of the working sub directory.
      (info) Please note, this field does not apply if you are using Maven 1.
    • 'Goal' — Specify the Maven goal that 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 Using Global or Build-specific Variables).
    • 'Build JDK' — Choose a JDK from the list. The JDK that you select will become one of the plan's capability requirements. For details please see Specifying a Plan's Capability Requirements.
      (tick) Tip: If you want to configure a new shared local JDK capability in Bamboo, you can do so by clicking the 'Add New JDK' link and entering the JDK details in the window that displays. Once you have added the new JDK, it will be available for you to select from the 'JDK' dropdown.

      Specifying Generic JDK Requirements

      If you want to indicate that an agent is capable of running builds for a set of related JDKs (e.g. all point versions of JDK 1.5), you set up generic JDK capabilities to encompass these JDKs.
      For example, you can set up the following JDK capabilities for your Bamboo agent(s):
      • JDK (where Label='JDK' and Java Home='/usr/java/jdk1.5.0_07') — this JDK capability indicates that an agent(s) is capable of running builds with any JDK requirement.
      • JDK 1.5 (where Label='JDK 1.5' and Java Home='/usr/java/jdk1.5.0_07') — this JDK capability indicates that an agent(s) is capable of running builds with a JDK 1.5 requirement or any point version of JDK 1.5, e.g. 1.5.0_07, 1.5.0_08, etc.
      • JDK 1.5.0_07 (where Label='JDK 1.5.0_07' and Java Home='/usr/java/jdk1.5.0_07') — this JDK capability indicates that an agent(s) is only capable of running builds with a JDK 1.5.0_07 requirement.

      (If you have set up redundant JDK capabilities, you can view the list of JDK capabilities set up in Bamboo and delete any unwanted JDK capabilities.)

      You can then specify these generic JDK capabilities as requirements for your plan.

  8. Update the system environment variables, working directory, project file and plan dependencies setting. These are optional settings:
    • 'System 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 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 builder, thus you don't need to specify them in the 'System Environment Variables' field.
    • '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 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.
    • 'Determine plan dependencies from my Maven pom.xml' — Check this checkbox if you want Bamboo to automatically set up your plan dependencies based on snapshots detected in your pom.xml file (so you don't have to respecify build dependencies in Bamboo that you have specified in Maven). Maven 2 will parse your pom.xml after the initial build and generate the dependencies. You will be able to view these dependencies on the build plan page.
      (info) Please note, this field does not apply if you are using Maven 1.
  9. Update the following general build parameters:
    • 'The build will produce test results' — 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. This format is also used by TestNG):
      • 'Look in the standard 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.
          (warning) For plans that use CVS the plan's root directory is <bamboo-home>/xml-data/build-dir/PLAN-KEY/<cvs-module>
    • 'NCover output will be produced' — Do not check this option. NCover is not relevant to Ant builders.
    • 'Override default build hanging detection' — Select this check-box if you want to override the default build hanging detection settings. These settings determine when a build hung event is thrown (e.g. you can configure your notifications to trigger from this event). The following settings will be displayed:
      • 'Build Time Multiplier' — This setting is used to calculate the 'Expected Build Time' for the build, i.e. 'Expected Build Time' = 'Build Time Multiplier' times 'Average Build Time' (note, the 'Average Build Time' is calculated by Bamboo by using an average of previous build times)
      • 'Log Quiet Time' — This is the amount of time since Bamboo last recorded an entry in the build log for a build.
        (info) The 'Expected Build Time' and 'Log Quiet Time' must both be exceeded for Bamboo to throw the build hung event.
      • 'Build Queue Timeout' — This is the amount of time that a build will wait in a build queue before an timeout event is thrown. Setting this value will override the global build queue timeout setting (see Configuring the Build Queue Timeout Event).
    • 'Use Clover to collect Code Coverage for this build.' — Select this check-box if you are running Atlassian Clover and want to collect code-coverage data to view from within Bamboo (see Viewing the Clover Code-Coverage for a Build Result). The following fields will be displayed:
      • 'Integration Options' — Select one of the following options:
        • 'Automatically integrate Clover into this build' — For this option, you have two sub options; 'Generate a Clover Historical Report' and 'Generate a JSON report'. The Clover Historical Report shows the current coverage results compared with previous Clover code coverage reports. The JSON report gives the Clover results in a format ready for embedding into applications or external report views.
          You will also need to insert a Clover license (evaluation licenses are available) into the field provided.
          (warning) A issue currently exists preventing this option working on Windows. Please see Enabling the Clover Plugin for more information.
        • 'Clover is already integrated into this build and a clover.xml file will be produced' — Use this option when you already have Clover-for-Ant or Clover-for-Maven configured to generate a report. You will also need to specify where the Clover XML report is being generated, under 'Clover XML Location'. For this, specify the name of the directory (including path) where Bamboo will look for the XML report output file from Clover. Please specify a file path relative to your plan's root directory, for example:
           target/site/clover/clover.xml 
          (info) Do not specify an absolute path.
      • 'Clover XML Location' — Specify the location 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.
  10. Click the 'Save'/'Done' button if you are editing an existing plan. If you are creating a new plan, you can either click the 'Save'/'Done' button to create the plan without completing the rest of the wizard (check/uncheck the 'Enable Plan' checkbox to create your plan as enabled/disabled as desired) or click the 'Next' button to go to the next page:
    Specifying a Plan's Capability Requirements