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

This widget could not be displayed.

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.

This widget could not be displayed.

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.

This widget could not be displayed.

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Friday in Bitbucket

What is your #1 piece of advice to new users getting started using Bitbucket?

Hello Community! My name is Claire Maynard, and I’m a Product Marketing Manager on the Bitbucket team. I’m interested in hearing what advice or tips you have for new users getting started on ...

125 views 5 2
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