Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

David M. Carr May 8, 2014

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
Answer accepted
Marcin Gardias
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 8, 2014

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 votes
Ron Chan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 8, 2014

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.

0 votes
Marcin Gardias
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 8, 2014

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.

Mihai Marinescu May 3, 2016

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events