This page last changed on Mar 28, 2008 by alui.

For each plan, you need to specify what type of source-code repository the plan will use, where the repository is located, and what type of build strategy the plan will use.

If you wish to build plans on your server and remote agents using a Perforce repository, you need to specify the location of the Perforce P4 client application for your server and each remote agent using Perforce. These locations are set by specifying a mandatory local server Perforce capability for your server and agent-specific remote Perforce capabilities for each of your remote agents using Perforce. You will not be able to create plans that use a Perforce repository without specifying the shared local Perforce capability first.

Read more about configuring a Perforce capability.

To specify a Perforce repository,

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 'Source Repository' sub-tab.
  5. The 'Source Repository' sub-tab will be displayed. Complete the fields as follows:

Perforce Configuration

  • 'Repository' — select 'Perforce'.
  • 'Port' — Type either the port to which the Perforce client will connect, or the Perforce server itself. This is the Perforce P4PORT environment variable that tells Bamboo which p4d (Perforce server) to use.
  • 'Client' — The name of the Perforce Client Workspace which Bamboo will use. The Client Workspace determines which portions of the depot are visible in your Workspace Tree.
    Do not create two plans that use the same client (e.g. one client set to manage, the other client set to not manage). This setup will create major issues in your builds.
  • 'Depot' — The client view of the depot that contains the source-code files for this plan. This is typically in the form //<clientname>/<workspace_mapping>/... For details please see the Perforce User's Guide.
    • To build to a particular Perforce label, enter the following: //Repo/Project/dev/...@mylabel (where 'mylabel' is the label you wish to match).
    • Bamboo sets the client root to its working directory, which means that code will be checked out to the 'working directory/<workspace_mapping>' location. Please take note of this, when specifying the 'Artifact Copy Pattern' for your Build Artifacts.)
  • 'Username' — (Optional) The Perforce username that Bamboo will use when it accesses the server ('Port'). Leave this field blank if you want Bamboo to use the default Perforce user (i.e. the OS username).
  • 'Password' — (Optional) Type the password required by the Perforce username (if applicable).
  • 'Change Password' — (This field will only appear after you have saved the plan) Select this check-box if you want to change the password that is used to access the Perforce repository.
  • 'Let Bamboo manage your workspace' — This field indicates whether you want Bamboo to manage your workspace or not.
    Please be aware of the following implications of letting/preventing Bamboo from managing your workspace:
    If you let Bamboo manage your workspace,
    • We recommend this configuration if your plans will be running on many different machines or different operating systems, as Bamboo sets the client root for you.
    • Bamboo will make configuration changes to the Client Workspace to manage builds (e.g. Bamboo will modify the host and root). You need to ensure that you enter a Client Workspace in the 'Client' field that will be used solely for Bamboo.
    • Under this configuration, you should configure one client per plan to avoid conflicts when updating the client root.

    If you do not let Bamboo manage your workspace,

    • We recommend this configuration if you wish to reuse your client for several plans, as Bamboo will retrieve the client root directory from Perforce and use it to run builds.
    • Under this configuration, you need to ensure that the client root directory exists on all machines that the plan will be built on.
    • Please note that alternate roots does not currently work in Bamboo. See issue BAM-2377 for further details.
  • 'Enable Quiet Period:' — Select this setting to set Quiet Period parameters for the build plan.
  • 'Quiet Period:' — This field will only display if 'Enable Quiet Period:' has been selected. This setting is used to avoid starting a build while someone is in mid-checkin. Bamboo will only initiate a build for this plan when no more changes are detected within the Quiet Period following the last known change. Type the number of seconds Bamboo should wait.
  • 'Maximum Retries:' — This field will only display if 'Enable Quiet Period:' has been selected. You can specify how many times Bamboo should check for new changes using the Quiet Period parameter before initiating a build. For example, if you have set the 'Quiet Period' to '10' seconds then Bamboo will check if a checkout has occurred in the last 10 seconds. If you have then specified 'Maximum Retries:' as '5', then Bamboo will perform this check five times before initiating the build, regardless of any activity during the Quiet Period of the last check.
Common Repository Configuration
  • 'Force Clean Build' (Optional) — You can force Bamboo to remove the source directory and check it out again prior to each build by selecting this option. Please note that this will greatly increase the time it takes to complete a build.
  • 'Include/Exclude Files' — (Optional) You can specify a particular inclusion or exclusion pattern for file changes to be detected.
  • 'File Pattern' — (Optional) The regular expression for file changes which you wish to include/exclude.
  • 'Web Repository URL' --- (Optional) You can specify the URL of the plan's browsable repository. If you specify a Web Repository URL, then links to relevant files will be displayed in the 'Code Changes' section of a build result.
  • 'Web Repository Module' — (Optional) The plan's repository name, if the above Web Repository URL points to multiple repositories.
  • 'Build Strategy' — The default value, 'Poll the repository for changes', is a convenient option that requires no additional configuration. A number of other options are available; for details, please see 03. Triggering a Build. You can change the Build Strategy over time as required. The rest of the fields on this tab will vary depending on which Build Strategy you select.
  • 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.2.3 Specifying a Plan's Builder.


Screenshot: 'Source Repository --- Perforce'



Document generated by Confluence on Apr 14, 2008 01:39