{ "info": { "author": "Nicola Heald", "author_email": "nicola@notnowlewis.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: Apache Software License", "Operating System :: POSIX :: Linux", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7" ], "description": "Zoidberg - A Gerrit Event And Response Tool\n===========================================\n\nZoidberg is a generic tool for easily running custom actions based\non gerrit events. Initially created to sync branches and reviews\nbetween two master gerrits, where the code needed to be shared but\naccess had to be separate.\n\nWith zoidberg, you could...\n\n- Notify an irc channel on an incoming review\n- Sync merged code to a third party git repo\n- ...respond to any gerrit event with anything you can implement in\n Python!\n\nSetup and configuration\n-----------------------\n\nFirst, install the code:\n\n $> python setup.py install\n\nNow create a configuration file with the details of your gerrit\nservers, the events you want to respond to, and the actions to\ncarry out when those events happen.\n\nThe configuration file is in yaml format, so go ahead and create\nan empty zoidberg.yaml, and we'll start putting in some details.\n\nConfigure gerrit instances\n--------------------------\n\nYou'll need to tell zoidberg the details of the gerrits you're\ndealing with. Zoidberg uses ssh to stream events from gerrit,\nso you'll need an ssh key registered with your gerrit instance.\n\nHere's how you configure a gerrit instance to connect to::\n\n - gerrits:\n - master:\n host: master-gerrit.yourdomain.com\n key_filename: /path/to/your/ssh_key\n username: your_username\n project-pattern: .*\n\n``project-pattern`` is a regular expression that you can use to limit\nthe projects you're interested in. Events received for projects that\ndo not match this expression will be ignored.\n\nYou can configure multiple gerrit instances like this::\n\n - gerrits:\n - master:\n host: master-gerrit.yourdomain.com\n key_filename: /path/to/your/ssh_key\n username: your_username\n project-pattern: .*\n - third-party:\n host: gerrit.someone-else.com\n key_filename: /path/to/your/third_party_ssh_key\n username: your_username\n project-pattern: .*\n\nNow when zoidberg starts up, it will connect to both gerrits and\nstart listening for events.\n\nConfigure actions\n-----------------\n\nWhen an event comes in that you're interested in, you will want to\nrespond with an action.\n\nExample: when a comment is posted on a review on the ``master``\ngerrit, we want it to be cross posted to the review for the same\nchange on the third-party gerrit.\n\nConfiguration::\n\n - gerrits:\n - master:\n host: master-gerrit.yourdomain.com\n key_filename: /path/to/your/ssh_key\n username: your_username\n project-pattern: .*\n events:\n - type: comment-added\n action: zoidberg.PropagateComment\n target: third-party\n - third-party:\n host: gerrit.someone-else.com\n key_filename: /path/to/your/third_party_ssh_key\n username: your_username\n project-pattern: .*\n\nThis will run the ``PropagateComment`` action with the third-party\ngerrit as its target.\n\nZoidberg bundles some useful actions for you in zoidberg/actions.py\n\n[TODO: developer guide for creating actions]\n\nConfigure startup tasks\n-----------------------\n\nIf you're keeping code in sync from a master gerrit to a third-party,\nyou'll probably want to make sure everything is in sync when you\nstart up.\n\nIn zoidberg, actions can define a ``run`` method, which is used to\nrespond to events, and/or a ``startup`` method which is used when\nzoidberg starts up. The bundled ``SyncBranch`` action implements both\nand here's how you'd configure it to keep a third-party gerry in sync\nwith your master::\n\n - gerrits:\n - master:\n host: master-gerrit.yourdomain.com\n key_filename: /path/to/your/ssh_key\n username: your_username\n project-pattern: ^stuff$\n events:\n - type: ref-updated\n action: zoidberg.SyncBranch\n branch-pattern: ^master$\n target: third-party\n startup:\n - action: zoidberg.SyncBranch\n target: third-party\n projects: [stuff]\n branches: [master]\n - third-party:\n host: gerrit.someone-else.com\n key_filename: /path/to/your/third_party_ssh_key\n username: your_username\n project-pattern: .*\n\nHere we're only interested in the ``stuff`` project on the master,\nand when the master starts up we want to sync the ``master`` branch\non the ``stuff`` project over to the ``third-party`` gerrit.\n\nThe startup task configuration block is passed in to the action, so\nany arguments extra to the required ``action`` and ``target``\n(in this case, ``projects`` and ``branches``) will be accessible to\nthe action.\n\nRun zoidberg\n------------\n\n $> zoidbergd -c /path/to/zoidberg.yaml\n\nTo run in debug mode and see a whole bunch of output:\n\n $> zoidbergd -c /path/to/zoidberg.yaml -v", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "zoidberg", "package_url": "https://pypi.org/project/zoidberg/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/zoidberg/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/zoidberg/0.2/", "requires_dist": null, "requires_python": null, "summary": "Event response tool for multiple gerrit instances", "version": "0.2" }, "last_serial": 1682089, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "e31aad6c39276bc815d16d26d3bc8597", "sha256": "6af80c77b786cdd7b3edab06dc6b3297f2756a35e1090c7b2fe530c1bd656b74" }, "downloads": -1, "filename": "zoidberg-0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "e31aad6c39276bc815d16d26d3bc8597", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 15245, "upload_time": "2015-05-26T12:52:55", "url": "https://files.pythonhosted.org/packages/34/76/0e3a2039f37bf6f6d65868741853192eda3d4cb7d49f9540c938bc2c9cd1/zoidberg-0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b95392f3b71e88d33dea2b1fcc5f3ad9", "sha256": "8ae787a49ac9c6291ec0f0f3dfd1eca03a0314f494ab08608ec3da7d37b82a9c" }, "downloads": -1, "filename": "zoidberg-0.1.tar.gz", "has_sig": false, "md5_digest": "b95392f3b71e88d33dea2b1fcc5f3ad9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16001, "upload_time": "2015-05-26T12:52:52", "url": "https://files.pythonhosted.org/packages/ba/ea/94e693f4ad5895a62b6715aba3e06092848287108137377f5b52324fe943/zoidberg-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "a162d6e37b614578c73f5c644c071c4c", "sha256": "c38245662d25fa5a3c4db5f93dc4ab9cb4c4188b731a8370cdd8d8ed34712aeb" }, "downloads": -1, "filename": "zoidberg-0.2.tar.gz", "has_sig": false, "md5_digest": "a162d6e37b614578c73f5c644c071c4c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17091, "upload_time": "2015-08-18T10:26:27", "url": "https://files.pythonhosted.org/packages/d4/54/120b18d2d00508d178152d67b8d148799f2eb65721fb9d2b57b8e1dbe6ab/zoidberg-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a162d6e37b614578c73f5c644c071c4c", "sha256": "c38245662d25fa5a3c4db5f93dc4ab9cb4c4188b731a8370cdd8d8ed34712aeb" }, "downloads": -1, "filename": "zoidberg-0.2.tar.gz", "has_sig": false, "md5_digest": "a162d6e37b614578c73f5c644c071c4c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17091, "upload_time": "2015-08-18T10:26:27", "url": "https://files.pythonhosted.org/packages/d4/54/120b18d2d00508d178152d67b8d148799f2eb65721fb9d2b57b8e1dbe6ab/zoidberg-0.2.tar.gz" } ] }