仓库指标
- Star
- (823 star)
- PR 合并指标
- (PR 指标待抓取)
描述
This is just to open up some dialog around adding a feature that I have implemented elsewhere and was considering contributing it to this repo.
Basically I created a ruby script that takes in a yaml file with a list of repo names and origin locations. This script will utilize the config.sh variables to figure out where the scripts and other configurations lie.
Example Mirror list file
---
puppet-staging: https://github.com/nanliu/puppet-staging.git
The script loops around the mirror list and adds them via the add_mirrors.sh script. Setting up a cron job allows one to automatically add new mirrors by just updating the mirror_list.yaml. Furthermore, if you keep the mirror list in a git repo and create a cron job to auto update the mirror_list repo you can basically control the whole mirroring via a new commit to the mirror list repo.
https://github.com/logicminds/gitlab_mirrors/blob/master/files/sync_mirrors.rb
If you think this is a nice feature and want to have it as part of the code base I can clean it up and issue a PR.
Additionally, I have created a basic puppet module for configuring everything mentioned above and the gitlab_mirrors configuration item specified in your README.md.
https://github.com/logicminds/gitlab_mirrors (I should rename this so it doesn't conflict, documentation coming soon)