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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bulk deleting 400 repositories in Fisheye/Crucible

The user interface of Crucible/Fisheye is not very intuitive, so when asked to add 480+ repos to Crucible to see how Crucible and the Git repositories behind it dealt with the load back on version 3.10.1, i wrote a script that appended all repositories to the config.xml.

Since that we have upgraded to Crucible/Fisheye 4.0.2 and with that the repositories were moved away from the config.xml.

Is there a easy way bulk removing repositories either via the database or somewhere else on the filsystem, without having to spend 12 hours clicking around in the laggy interface?

Unfortuantly Bob Swift's Crucible CLI plugin is not compatible with the latest version of Crucible, and i seem to fail when attempting to do it via the Native REST api.

If someone has a snippet of bash script that can stop and remove a single repository, this could also help me.

Kind regards

Jonas

2 answers

1 accepted

1 vote
Answer accepted

Hi Jonas, repositories were always and are in config.xml - not server.xml. Please check you are looking at the correct config.xml in FISHEYE_INST.

mac

1 vote

Hi Jonas,

Repositories are still present in config.xml (Crucible/Fisheye 4.0.2) so you still should be able to manipulate config.xml directly.

However I would recommend to use FishEye & Crucible REST Admin API to add/delete/update repositories.

Here is the repositories admin API: 

https://docs.atlassian.com/fisheye-crucible/latest/wadl/fecru.html#rest-service-fecru:admin:repositories

There is also a python FishEye & Crucible REST client that you could use:

https://bitbucket.org/atlassian/fecru-rest-examples/src

Install the REST client:

pip install git+https://bitbucket.org/atlassian/fecru-rest-examples.git

then run the script which should look something like:

from fecru_rest.admin_repositories import *
import fecru_rest.config
 
config.url = 'http://url/to/fecru'
config.user = 'adminName'
config.password = 'adminPassword'
 
rep_name = 'repositoryName'
 
stop_repository(rep_name)
delete_repository(rep_name)

 

Use:

get_repositories(start=0, limit=400)

to iterate over repositories. Have a look at examples here: https://bitbucket.org/atlassian/fecru-rest-examples/src/master/fecru_rest/examples_repositories.py?at=master&fileviewer=file-view-default

mac

 

No, repositories added on 3.10.1 are no longer in server.xml after the upgrade to 4.0.2, so yes, i can edit my license key and some other stuff, but the 1200 lines with XML describing the repos are no longer there. Not sure who approved this as the right answer, but feel free to reproduce the scenario and you will see i am right.

 

Will have a look REST API again, thanks a bunch for now.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Building a powerful Kanban dashboard in Jira with Great Gadgets app

Kanban is a popular agile framework suitable for both operations and development teams. It does not matter if you are a support team handling issues reported by customers, an internal service desk te...

9 views 0 0
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you