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

How can I checkout a folder from GIT and upload the same folder to svn using BAMBOO?

Sarath Sasi September 5, 2019

I want to upload a folder into svn after fetching the latest copy of the files from GIT. Is there a way I can achieve this through Bamboo?

1 answer

0 votes
Daniel Santos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 11, 2019

Hi @Sarath Sasi

You will need to configure your plan with a script task to checkout the SVN repository and commit the content copied from GIT. The commit task available in Bamboo is not able to commit code in SVN, only in:

  • Bitbucket Cloud
  • Bitbucket Server / Stash
  • Git
  • Mercurial

The alternative you have is to use a script task for that. Considering that, these are the options I can suggest:

Option 1: Git as a plan repository + Script task

  1. Configure GIT as your plan repository.
  2. Make sure you have checkout task to checkout your code
  3. Add a script task after the checkout task.
    In this task you should:
    1. Create a folder for your SVN repository
    2. Checkout the SVN repository
    3. Copy the GIT files to correct folder in SVN
    4. Commit the code

Option 2: Everything in a script task

  1. Create a script task in your plan
    In this task you should:
    1. Create a folder for your GIT repository
    2. Checkout the GIT repository
    3. Create a folder for your SVN repository
    4. Checkout the SVN repository
    5. Copy the GIT files to correct folder in SVN
    6. Commit the code

I would suggest you using option 1. The advantage here is that you will not need to manage the credentials for git in the script task, but only for SVN. Another good thing is that Bamboo will be registering the commits revisions in the Build results.

I hope it helps you.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events