Is it possible to run a script to extract data from a Stash repository

Hi Team,

I have a small doubt.

Previously we were using Clearcase for version control and now it is being replaced by Git. Stash is used as the Git repository management. Earlier, one of my collegue wrote a script to extract the code required for our deployment from the clearcase VOB file and place it in the server path. (in which the deployment is about to happen)

Now, I want to get the final codes from the Stash repository and place them in the same path. Is there a way to extract these files, that are ready for deployement from the Stash repository (remote repo) directly?


Thank you in advance !!!

Warm Regards,


2 answers

I often want to do this as well, i'm not sure a curl is the most robust way.

Since you don't want to put much script logic in your bamboo tasks (they should be version controlled in git) can the team create a task type which is 'run bash script from repository', which can use your default repository and check out a single file and run that file (and specify arguments)?

This would make our bamboo plans much cleaner and we wouldn't have to rely on wget / curl or anything like that being installed on the build slave.

Hmmm... not quite sure whether I got your problem correctly, but you easily can clone your repository from stash via git commandline.

So: write a script, which clones the desired repository to a temporary place and which copies the desired files from your clone to the destination directory ...

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
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

23,739 views 26 12
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