Checking out code

You use the Source Code Checkout task to check out a repository for use by just one job. By default, repositories are checked out to the Bamboo working directory. 

Using Source Code Checkout task you can also:

  • Check out repositories to a custom directory path in the working directory.
  • Specify multiple checkouts that occur at different stages of the build. (Simply add another Source Code Checkout task to a job at any point in the plan.)

For information about specifying a repository for use by all the plan's jobs, or by all plans, see Linking to code repositories.

To configure a new Source Code Checkout task:

  1. Navigate to the job that should perform the task.
  2. Select the Tasks tab, and select an existing Source Code Checkout task in the tasks list, or add a new one using the Add task button.
  3. Configure the task:

    Task description
    Enter a description of the task, for display in Bamboo.

    Disable this task
    Check, or clear, to selectively run this task.

    Add condition to task
    Make task run only when a certain condition is met. 
    You can find conditions on Atlassian Marketplace or implement your own.  


    Repository
    Select the desired repository. If you wish to add different types of repositories, they must have been previously defined on the plan's Source repositories tab. See Linking to source code repositories for a list of supported SCMs.

    Checkout Directory
    The location to which the contents of the selected repository will be checked out to when the task executes.

    Force Clean Build
    Deletes the previously checked out directory and checks it out again prior to the next build. This may significantly increase build times.

  4. Select Add repository at the bottom of the screen to check out another repository using this task. 
  5. Select Save.

Source Code Checkout task configuration

Notes

  • If you need to use a type of repository that is not supported, a number of third-party Source Repository plugin modules are available (e.g. ClearCase plugin). You can also write a Source Repository Module plugin to enable Bamboo to connect to your repository.
  • If Source Code Checkout task is used in Deployment Environment, it will only checkout the latest revision instead of the revision used in the related build result.  BAM-13279 - Getting issue details... STATUS
Last modified on Dec 15, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.