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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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

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
Community showcase
Published in Bamboo

Bamboo 7.1 is here and is packed with value!

I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...

595 views 1 6
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you