aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-12-14git-gerrit-mirror: update for python3HEADmasterKelley Spoon
Somehow this script didn't get updated for python, so let's do that now. Change-Id: Ie4109ec6990fb1b9346f51cb6513d129301d6c66 Signed-off-by: Kelley Spoon <kelley.spoon@linaro.org>
2021-01-07git-gerrit-mirror: add ability to override repo_root per sectionKelley Spoon
The way this script was previously working is that we define several DESTINATIONs with one acting as a default. The destination for git pushes can be changed via command line option, but all pushes are still sent to the same location. We have a situation with an android mirror where we do *not* want to push it through gerrit as it is served only via gitolite. Since the upstream contains around 1060 repos, we prefer to push it straight to disk and leave gerrit out instead of creating a huge load for the server. This change allows us to specify the repo_root variable in a host section to bypass the default DESTINATION. Change-Id: Ibbb5470b632e29598f4a8d1e77b1b9d955067755
2019-02-20git-gerrit-mirror: add --all to gerrit ls-projectsKelley Spoon
In gerrit 2.16 there was a slight behavior change in the gerrit 'ls-projects' command in that it does not appear to recurse through parent projects to list children unless you explicitly request it with the '--all' object. This was causing our git-gerrit-mirror script to attempt to recreate multiple projects that already existed. Change-Id: I5e66a860e72303580e9ad577a24831ab2beb6c46
2018-06-04GerritMirror: remove prune from pushKelley Spoon
Revert to previous push command in order to avoid deleting local branches. Change-Id: I94de76608bf95e328e9445c8cd38a3457bc63274
2018-05-31GerritMirror: add prune options to fetch and pushKelley Spoon
Enable pruning on fetch from origin and push to miror in order to remove obsolete branches and prevent unused objects from accumulating. Change-Id: Id602431834d211655183b630ef0636ac912ffff9
2017-04-04cron-runner: Add umask ruleBen Copeland
This is in place to reduce crontab email tag.
2016-05-19git-gerrit-mirror: --name option to gerrit create-project removed in 2.12.Paul Sokolovsky
Now name should be just a literal argument. Change-Id: I8bd56c4beb4b610e42adfb548df98e3d3d7aa071
2016-04-18git-gerrit-mirror: Create projects locally only for local repo_root.Paul Sokolovsky
Fix faulty detection logical of local vs remote Gerrit vs remote something from previous commit. Change-Id: I29807891440754470b50c9e78dc93c9caeed2b0e
2016-04-07git-gerrit-mirror: Allow to pick manifest from a mirrored repo.Paul Sokolovsky
Thus, it resolves issue with where seed manifest comes from, and how to keep it up to date. Change-Id: I9e0458a9120d2b72d8d4d405d367037ca180e3d5
2016-04-06git-gerrit-mirror: Make "create" command work for "repo_root" destination.Paul Sokolovsky
Previously, "create" command worked only if mirroring destination was gerrit. Allow it to work also for the case of local filesystem repo tree. Change-Id: I7afbe3374c3c9de1d93e0650e4eae4bf3923dbdc
2016-04-06git-gerrit-mirror: Allow to create more than one mirror of the same host.Paul Sokolovsky
Sometimes different downstream projects may need different mirrors of the same upstream tree. So, just allow to have different mirroring entries for the same host, differentiated with "#slug". Change-Id: I8a2edd0a58e22965ab896d3c5839623b0f844840
2015-11-12oops: fix last changeAndy Doan
Change-Id: Ia03899d2a10741e8af35005ff8a4a15cb6a30e80
2015-11-12fix grokmirror logic when mirror name and local name differAndy Doan
I noticed a bug where a mapping like: 96boards/android_device_linaro_hikey = device/linaro/hikey would cause an error in the grokmirror logic because it assume the local repo was named "96boards/android_device_linaro_hikey". This fixes the problem in a few repos. Change-Id: I063f9b0d9cc15f190d6e249ee9df3b03dbd51b4c
2015-10-08mirror.conf.sample: Add warnings against bypassing Gerrit for mirror pushes.Paul Sokolovsky
Change-Id: I9e74ab5ad21c7ce4dd2a48250eb224d879400982
2015-06-02allow repo to be read-only in productionAndy Doan
Our production code runs from the directory containing this repo, which means its needs write-access so it can create the cache file. By changing the cache file location, we are able to clean up our deployment slightly. Change-Id: I2555684a7b955728d2ea23e119143233927a8bc5
2015-06-02pep8/pyflakes - fix line too long issues and remove an unused variableAndy Doan
Change-Id: Ie81887b970b50ac8fe1d8363e30eb6dce78504d8
2015-06-02fix easiest pep8 spacing complaintsAndy Doan
There are tons of pep8 and pyflakes issues in this file, making it a little hard to do checks against new changes. Change-Id: Id7137d234c1d6385ba588ad38bef1896f60716b9
2015-04-27detect errors in create logicAndy Doan
The fact we miss errors from the ssh command were causing us to see tons of error messages like: fatal: internal server error fatal: project "platform/frameworks/multidex" exists fatal: project "platform/external/eclipse-basebuilder" exists fatal: project "platform/external/safe-iop" exists fatal: project "platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8" exists The only real error was not knowing what projects gerrit knew about. This helps us exit when that happens so we can further debug if needed. Change-Id: I3d41778abff1bc5c9f12753a24b0143c3a5dd2a1
2015-04-16use full path to grok-manifestAndy Doan
Seeing an error in our cron job: Cloning into bare repository 'selinux.git'... sh: 1: grok-manifest: not found It seems /usr/local/bin isn't in the path when this is executed, so lets pass the full path to the grok-manifest script. Change-Id: I1c102749e60e8d87dcb2bff0c38db989c1ca497e
2015-04-06enable optional support of grokmirrorAndy Doan
This allows us to update the grok manifest file when changes are made to a repo. Change-Id: If9a47f3502e1ae0e7fa2b285231f6cc71baf3d5c
2014-11-22When pushing mirror changes locally, disable gitolite hooks.Paul Sokolovsky
When run with local push, gitolite hooks apparently lack some information available when run with SSH wrapper, and misbehave (error out, etc.) Change-Id: Ie182efbdf636e07c7a2cfd9436c04310cdfba3a3
2014-10-09Don't show progress indicator on push unless --debug.Paul Sokolovsky
Progress indicator rendering just contaminates logs. Change-Id: I51666f2a6305ec465f718db29a3a2218f27a6474
2014-10-08Add missing comment marker in sample config.Paul Sokolovsky
Change-Id: I964a7691c010e41b2e8e1d08ab624938aff4c860
2014-10-08Remove host-specific dir, now config is handled by ansible.Paul Sokolovsky
Change-Id: I9545117d5b7ff3a40b875818f8e67b6ba58f2cd0
2014-10-08Rename mirror.conf and crontab to *.sample.Paul Sokolovsky
Actual config is now managed by Ansible in ansible-playbooks.git . Change-Id: If895fca2b1b6c6b8148a9707ba893fcec01e8f04
2014-10-08Move cron wrapper scripts to top level, as they're not host-specific any more.Paul Sokolovsky
Change-Id: I7167cd3f2768a06dce9b4a8f80e0de8d494293de
2014-10-08Add --limit= option to limit number of projects processed per run.Paul Sokolovsky
Useful for debugging. Change-Id: I99297b61d15feeb1b1ccf2742fb947e082f97aa2
2014-09-29Elaborate handling of tree URLs with paths.Paul Sokolovsky
Paths in URLs are now allowed, and will be encoded in top-level mirror dir name (with slashes replaced by double-underscores). Change-Id: Ia63bf33f0ebd102932ce0ecb3c4075f27f8c1b98
2014-08-21Make sure that literal projects can augment list got from $manifest, etc.Paul Sokolovsky
Change-Id: Ic657ddd36c0ef0f9ad1dd0c9ff9ae93727d4dee5
2014-08-20Add config examples for $manifest and wildcard mapping features.Paul Sokolovsky
Change-Id: I3e2077d205ae23cccf75eff683167e68f4fc370e
2014-08-20Add support for wildcard project mapping specification.Paul Sokolovsky
For example "* = subtree/*" means "mirror all source project under subtree/ on target (multi-component source paths are preserved of course, for example foo/bar/baz.git becomes subtree/foo/bar/baz.git on target)". Change-Id: Ic54605ceeae24e0add70081044e9b3cd6b7b296b
2014-08-20Introduce $manifest per-host config option, deprecare --manifest cmdline opt.Paul Sokolovsky
Manifest is inherently per source tree, so passing it globally was a hack. Change-Id: I0686c400bddb3c032250065115688f21df841172
2014-04-23Add new repositories to be mirrored.Milo Casagrande
* As per Launchpad bug 1311008. Change-Id: I5a0492b430ee482d9acf260b9f1c12eaa8bb7589
2014-03-17Comment out unreachable repositories.Milo Casagrande
Change-Id: I223705a4413c26b43db14996e233132d0d2fbb82
2014-03-13Update mirror directory.Milo Casagrande
* Use new mirror directory to store upstream mirrors. This is the same directory layout used on git.l.o to store mirrors. * Added checks if directories exist. Change-Id: I2cc2093a94c90553dc1946d2505326139b375915
2014-01-17Time each individual push operation, to debug push hangs we have.Paul Sokolovsky
Change-Id: Ib99911541e04cd9899290ea803e94a756b3a026f
2014-01-17Kill timeout subprocess when main is done.Paul Sokolovsky
Change-Id: I16451288176f74a9820ce1a7adca8cec54018d97
2014-01-16Add cronjob run timeout (2hr).Paul Sokolovsky
Fixes https://bugs.launchpad.net/linaro-android-infrastructure/+bug/1268903 Change-Id: I184fd61d02bb1e7e658d9ae4aa2026bae81dec0e
2014-01-16Add .gitreview.Paul Sokolovsky
2014-01-08[lp:1264277] Mirror people/jesse.barker/glmark2Paul Sokolovsky
2013-11-15Update for --gitweb-list= refactored to per-upstream config setting.Paul Sokolovsky
2013-11-15Add per-usptream project_list param to get project list via URL.Paul Sokolovsky
2013-11-15lp:1251673: Refactor external data caching.Paul Sokolovsky
2013-11-15lp:1190181: Mirror ↵Paul Sokolovsky
https://git.kernel.org/cgit/linux/kernel/git/rostedt/trace-cmd.git
2013-11-15Improve logging.Paul Sokolovsky
2013-11-15Make warning message more clear.Paul Sokolovsky
2013-09-16Add --quiet option and use it in our cronjob to avoid useless warnings.Paul Sokolovsky
"Useless" in our cronjob, not in a generic reusable tool.
2013-08-28lp:1216818 Mirror production PMWG repos.Paul Sokolovsky
2013-08-13Be sure to clone new non-AOSP projects too.Paul Sokolovsky
2013-08-13Allow to disable Gerrit SSH access and do that for ↵Paul Sokolovsky
android-review.googlesource.com It's just not supported (blocked) there.