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

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

Jewel Francis February 2, 2015

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

1 vote
rpocklin September 1, 2015

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.

0 votes
Johannes Kilian
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 3, 2015

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
TAGS
AUG Leaders

Atlassian Community Events