When are repositories for jobs/stages pulled in Bamboo

We have a build project that has for jobs in 2 stages.


stage 1


    checkout source and build  and check in website code   (ie,  build is checked in)


2. checkout source and build and check in db migration updates  (ie, migration script folder is checked in


deploy stage


    pull down the build via nant and deploy to QA web servers


2. pull down the repository that holds all migration scripts (ie,, .050, .051, and suppose to be new .052)


apply the appropriate migration scripts to qa in order (.49, .50, .51 and the supposed to be .052)


Our problem is that it appears like the repositories for deploy stage step 2 do not contain the new checked in migration scripts created in stage 1, step 2.


Its almost like the repositories are pulled down for all stages, before the stages actually run.


Is this a true statement?

how do we force bamboo to pull the repositories just before the job runs like it is configured?

4 answers

Here's what I do that sounds similar to what you want.

I generate an artifact in my build and use deployment plans.  The artifact(s) can contain anything you want since you generate the file.  You could create the file with the build number.  Then your deployment will have that artifact available which you can read programmatically or pass in as an input to a script.

My understanding of the checkout source task across multiple stages in the same plan is that bamboo guarantees each source checkout of the same repo will use the same sha1 (or version).

I would recommend if you need the version of source to be different, then create your second stage as a dependent build plan so that is runs as a separate plan, rather than a second stage in the first plan.

Alternatively, you can add a command or inline script after the sourcecode checkout to run your update to pick up the checkins from the first stage.


It looks like even if the second stage is made into a dependency build it still pulls the head version info at the begining of the build chain. I actually have to completely separate the build from the deploy

Heather, thanks for responding,  I dont mind doing that but how do I transfer the build number that we are using from the first build (eg, to the dependent project as a variable deploy.buildnumber?


Any thoughts on that?


We originally had separate plans but couldnt get the build number from one plan to the other.

Thats what I did.  I pushed the full release number ( to a buildnumber.txt file, then shared it, did an artifact download on the dependent deploy project and read in the new buildnumber to deploy.



Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Monday in Confluence

Organizing your space just got easier - Page Tree Drag & Drop is here

Hi Community! I’m Elaine, Confluence Product Manager. You may have read my earlier post about page tree in space navigation sidebar. I'm excited to share another improvement that helps you organize ...

103 views 3 4
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you