How can I use a Git repository in a Bamboo Deployment Project?

My Bamboo server is currently version 5.3 build 4101. I want to use a deployment script that's stored within the project's git repo as one of the steps for the deployment project.

When I edit the tasks for an environment in the deployment project, it allows me to add a Source Code Checkout task and it includes a message "Typically, this is used for accessing scripts required for your deployment. However, any compilation and packaging of code should be performed in the plan related to this Deployment Project and the result of the packaging shared via Artifact Sharing" that makes me think that it's intended to be supported. However, the Repository drop-down is empty, doesn't allow selections, and I can't figure out how to get a repository to show up there. If I save the Source Code Checkout task with the repository field blank, it doesn't do anything when the environment is deployed.

Is there a way to get the Source Code Checkout task working in a deployment project?

3 answers

1 accepted

1 vote

You need define your repository as 'Shared Repository': Administration -> Shared Repositories (in version <= 5.4 nomenclature; it's called Linked Repository in 5.5).

You can convert your existing repository to shared by going to it's configuration and clicking on 'Convert to shared repository' link. (you need to be Bamboo admin for this)

Please note that checkout task in Deployment project always updates to the tip of the git branch.

0 vote

You need define your repository as 'Shared Repository': Administration -> Shared Repositories (in version <= 5.4 nomenclature; it's called Linked Repository in 5.5).

You can convert your existing repository to shared by going to it's configuration and clicking on 'Convert to shared repository' link. (you need to be Bamboo admin for this)

Please note that checkout task in Deployment project always updates to the tip of the git branch.

For us it is a big deal and the main reason we are not using Deployment projects that the Sourcecode Checkout task is not checking out the same exact code that triggered the deplyment build. It is not nice to make artifacts with sourcecode/scripts when it's available in the Sourcecode system. They should be retrieved from there, i don't understand why Atlassian has not added this simple feature that the user can specify which revision to checkout.

If don't require the entire repository, I would suggest you tag the script(s) as an artifact on the build side, then your deployment project will be able to use each time.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,561 views 0 6
Read article

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