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,

-Jewel

2 answers

This widget could not be displayed.

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.

This widget could not be displayed.

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 Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,243 views 8 11
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