Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to gather data from multiple gerrit servers and multiple projects? #28

Open
ssbarnea opened this issue Aug 17, 2017 · 4 comments
Open

Comments

@ssbarnea
Copy link

It seems that the documentation lacks information about how to gather data from multiple gerrit instances and multiple projects.

The idea of downloading all projects where you have access to does not make any sense for anything else than very small deployments.

We use 4-5 instances, one internal and the rest public, like gerrithub.io which is HUGE and where we have projects under multiple organizations, so we need a way to gather these in a single place.

@holmari
Copy link
Owner

holmari commented Aug 17, 2017

./gerrit_downloader.sh --server gerrit.instance.on.inter.nets --project YourProjectName should do the trick. If you want to download multiple projects under one instance, you can pass --project several times. Does that help?

@ssbarnea
Copy link
Author

ssbarnea commented Aug 17, 2017

@holmari Thanks for the quick reply. In fact not really because I do want to download all project under a certain organization. On gerrithub the project name is like organization/project. I tried to specify only the organization and it failed to download, it seems that it requires full project name.

What I need is some sort of wildcard support. Please understand that we are talking about a bigger number of projects, a set that can even change in time.

Another issue that I spotted was that in order to make it possible to talk with gerrithub, I had to put -- server my_username@reviews.gerrithub.io which makes the script less portable. Probably that's a limitation due to the way ssh works on gerrtihub.

@holmari
Copy link
Owner

holmari commented Aug 17, 2017

Got it. You're right, there's no support for wildcards at the moment. You can work around this problem pretty easily by issuing gerrit ls-projects over ssh on the remote server, and parsing the list and passing it to the downloader as --project arguments.

Alternatively, this kind of wildcard support could be implemented in Downloader.java, by checking if any of the passed project names have wildcards, and if yes, downloading the project listing as well as filtering them based on the wildcards. It doesn't sound like a lot of code - PR maybe? :-)

@ssbarnea
Copy link
Author

I am not proficient in Java so I will workaround this by making a bash wrapper and ls-projects for the moment. If I am not wrong gerrit supports regex like patterns so maybe it would be easier than we think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants