Skip to end of banner
Go to start of banner

How to list all repositories

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Summary

This is a simple example of using the runFromProjectList and getRepositoryList action together to get a list of all Stash repositories.

Steps

  1. Start with a simple getProjectList action to see all the projects in Stash
  2. Pick one of the projects and run getRepositoryList with project set to the project
  3. Combine the getRepositoryList with the runFromProjectList action
  4. Output the results to a file using append

Example

Get list of all repositories in Stash
stash --action runFromProjectList --common "--action getRepositoryList --project @project@ --file repository-list.csv --append"
Example output
"Project","Slug","Name","Id","SCM","State","Status","Clone URL","Clone SSH URL","URL"
"EXPERIMENT","ex1","ex1","3","git","AVAILABLE","Available","http://automation@myserver/scm/experiment/ex1.git","","/projects/EXPERIMENT/repos/ex1/browse"
"ZCLI","plugin","plugin","66","git","AVAILABLE","Available","http://automation@myserver/scm/zcli/plugin.git","","/projects/ZCLI/repos/plugin/browse"
"ZSCLIP","repo","repo","67","git","AVAILABLE","Available","http://automation@myserver/scm/zsclip/repo.git","","/projects/ZSCLIP/repos/repo/browse"
"ZSTASHCLI","zstashcli2-repo","zstashcli2-repo","64","git","AVAILABLE","Available","http://automation@myserver/scm/zstashcli/zstashcli2-repo.git","","/projects/ZSTASHCLI/repos/zstashcli2-repo/browse"

 

 

 

 

  • No labels