...
Summary
This is a simple example of using the runFromProjectList and getRepositoryList action together to get a list of all Stash repositories.
Steps
- Start with a simple getProjectList action to see all the projects in Stash
- Pick one of the projects and run getRepositoryList with project set to the project
- Combine the getRepositoryList with the runFromProjectList action
- Output the results to a file using append
Example
No Format | ||
---|---|---|
| ||
stash --action runFromProjectList --common "--action getRepositoryList --project @project@ --file repository-list.csv --append" |
No Format | ||
---|---|---|
| ||
"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" |