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
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

1,905 views 7 10
Read article

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