Bamboo uses the 'Source Code Checkout' task to check out repositories into the working directory on the agent.
Using this task it is also possible to:
- Check out multiple repositories to a custom directory path in the working directory
- Specify multiple checkouts that occur at different stages of the build. (This can be achieved by simply adding another 'Source Code Checkout' task to a job at any point in the plan.)
To configure a new Source Code Checkout task:
- Navigate to the job that should perform the task, as described on Specifying the source repository.
- Click 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.
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. 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 Specifying the source repository 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. - Click Add Repository, at the bottom of the 'Task' screen, to add another repository to the task.
- Click Save.
Screenshot: Configuring a Source Code Checkout task
Notes
- All Jobs in a plan check out the same revision - the revision that will be used by all jobs in the plan is determined before the plan is run so that all jobs consistently build the same revision
- A number of source repositories are supported 'out of the box', as described on the Connecting to code repositories page

3 Comments
Melanie Wright
Dec 03, 2013It would be helpful to add a note here that all Jobs in a Plan check out the same revision, as described by Przemek Bruski on this Answers.Atlassian.com Question:
NathanA
Dec 09, 2013Thanks Melanie - I have added a note at the bottom.
Arun Tiwari
Dec 30, 2013I am facing an issue with the checkout inconsistency in bamboo.
Scenario is i have got two stage build plan in bamboo. In the first stage one build job runs the code metrics build and once it is successfully finished it runs the second stage job whose main purpose is to package the artefact as war file.
For one particular build number both stages ran successfully and then showed that it picked up change from svn revision number 39 and it correctly showed the file changed as part of that revision number. However when i checked the content of one of the changed file in the war after decompilation it showed me the file content was that of svn revision number 38 and not 39. This is really confusing and can someone explain the possible reason of such behaviour