How do I stop all repositories in crucible?

We have several hundred repositories, in order to keep our current code reviews up to date more regularly, we stop any repositories that don't have open code reviews.

Whenever crucible is restart (e.g. for an upgrade) all of the repositories are started and we have to manually stop them.

Is there a tool (command line or interface) we can use to stop all repositories?

2 answers

This widget could not be displayed.

You could disable those repositories, that would be persisted between restarts.

But to be honest I don't fully understand your use case, what's the point of stopping repositories with no open reviews?  If there are no activity in those repositories, no new commits are pushed and no reviews created, keeping such repository open should not cause any harm to your instance.  On the other side if developer decides to push new changes to such repository and raise a code review, one would need to ask FeCru administrator to start this repository, wait for incremental index to pick up the changes before review could be created.  I would appreciate if you could explain your rationale behind stopping those repositories.

Finally, if you still believe you need a tool to stop selected repositories easily, you can consider using FishEye REST API, see https://docs.atlassian.com/fisheye-crucible/latest/wadl/fecru.html#rest-service-fecru:admin:repositories:name:stop

There is example python client provided, you can consider using it too: https://bitbucket.org/atlassian/fecru-rest-examples/src/master/python/README.md?at=master

Cheers,

This widget could not be displayed.

Hi Piotr,

We have about 400 repositories and we add more each week, even if repositories do not have any activity it can still take a long time for the system to check each repository for activity and get around to the one you need. Even forcing the incremental index to run can take quite a while.

Currently we get around this by allowing admin access to everyone (not a major concern in a team with a handful of programmers). We stop all repositories regularly (manually) and then programmers can activate and force the incremental index to get their changes picked up almost immediately.

Due to us being a time billing driven company and requiring fast turn-around of work, we need to be able to write code and put it up for review in one time block if possible.

Your solution of disabling the repositories I think will be sufficient, assuming there are no flow-on effects.

Cheers,
Steven

Hi Steven, Thanks for providing the rationale behind your case. Disabling repositories should indeed help you achieving your goal. But I am finding this a pretty radical solution to the problem, I'm guessing there is a value of keeping all repositories up and running, developers can use their data when searching the code or accessing old code reviews perhaps. If that's the case there might be a nicer solution to the problem. You may want to increase the default polling period, to 12h for instance, so each of your 400 repositories will be scanned twice a day only for changes. To ensure the active repositories are indexed promptly once new changes are committed, you may want to configure https://confluence.atlassian.com/display/FISHEYE/Configuring+commit+hooks instead. That would send a promptly notification to FishEye once new change is added. Also, depending on the SCM types you're using and hosting solutions used, if you use git and Stash, there is out of the box mechanism provided to have FishEye notified each time Stash detect repository change, see https://confluence.atlassian.com/display/FISHEYE/Integrating+FishEye+with+Stash. Hope that helps, Piotr

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

146 views 2 0
Join discussion

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