{ "info": { "author": "Marvin Pohl", "author_email": "hello@lab132.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Plugins", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: MacOS", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX :: Linux", "Topic :: Software Development :: Build Tools" ], "description": "# Buildbot Gitea Plugin\n\n\n[![PyPI version](https://badge.fury.io/py/buildbot-gitea.svg)](https://badge.fury.io/py/buildbot-gitea)\n![GitHub](https://img.shields.io/github/license/lab132/buildbot-gitea)\n[![Build Status](https://travis-ci.org/lab132/buildbot-gitea.svg?branch=master)](https://travis-ci.org/lab132/buildbot-gitea)\n\nThis plugin for buildbot adds integration support with gitea, featuring push hooks, commit status updates and a change source.\n\n# Installation\n```\npip install buildbot_gitea\n```\n\nThis installs itself into the plugin discovery of buildbot, so no extra imports are required to get buildbot to find the plugin.\n\n# Configuration\n\nThe following configuration shows how the different parts of the plugin can be set-up in the buildbot master.cfg:\n\n```py\n\nfrom buildbot.plugins import *\n\nc = BuildbotMasterConfig = {}\nc['www'] = {\n 'change_hook_dialects': {\n 'gitea': {\n 'secret': '',\n 'onlyIncludePushCommit': True\n }\n },\n}\n\nc['services'] = [\n # Report status back to gitea, verbose flag enables verbose output in logging for debugging\n reporters.GiteaStatusPush(\n 'https://example.com', \"SECRET\", verbose=True)\n]\n\nbuildFactory = util.BuildFactory()\n\nfactory.addStep(steps.Gitea(\n repourl=\"ssh://git@example.com/example_user/example_project.git\",\n mode='incremental',\n workdir=\"build\",\n branch=\"master\",\n codebase='example_codebase',\n progress=True,\n logEnviron=False,\n))\n```\n\nThe webhook currently supports pushes and pull requests by default, but you can\nsubclass `buildbot_gitea.webhook.GiteaHandler` to add supports for other events,\nand then use your subclass by setting the `class` parameter:\n\n```py\n# myhook.py\n\nfrom buildbot_gitea.webhook import GiteaHandler\nclass MyGiteaHook(GiteaHandler)\n def process_whatever(self, payload, event_type, codebase):\n # This should be a list of dicts\n changes = []\n\n return changes\n\n# master.cfg\n\nfrom myhook import MyGiteaHook\n\nc['www'] = {\n 'change_hook_dialects': {\n 'gitea': {\n 'class': MyGiteaHook,\n # ...\n }\n }\n}\n```\n\nNote that the handlers need to be named according to the scheme:\n`process_{event}` (e.g., `process_create`, etc).\n\n# Parameters\n\n## Change Hook\n\nThe change hook is set as part of the `www` section in the `change_hook_dialects` named `gitea`.\n\n| Parameter | Description |\n| --- | --- |\n| `secret` | The secret, which needs to be set in gitea |\n| `onlyIncludePushCommit` | A push may have more than one commit associated with it. If this is true, only the newest (latest) commit of all received will be added as a change to buildbot. If this is set to false, all commits will inside the push will be added. |\n| `class` | Set this if you want to use your own handler class (see above for details) |\n\nIn gitea in your project or organization and add a new webhook of type gitea.\nSet the parameters as follows:\n\n| Parameter | Value |\n| --- | --- |\n| Target URL | https://example.com/change_hook/gitea/ |\n| HTTP Method | `POST` |\n| POST Content Type | `application/json` |\n| Secret | The `secret` from above |\n\n## Change Source\n\nThe change source is part build step to clone a gitea repository. It includes features to build a pull request, if the pull request can be merged without conflicts. This needs to be used in conjunction with a gitea `change_hook` and have it send pull request updates in order to be able to handle pull requests.\n\nThe parameters for this are identical to the default [`git`](http://docs.buildbot.net/latest/manual/configuration/buildsteps.html#git) step from buildbot. It just uses information provided by the gitea `change_hook` to be able to handle pull requests.\n\n## Reporter\n\nThe reporter sets the commit status of a commit inside of gitea, so in gitea a small icon will be displayed next to the commit message, indicating the build status.\n\nThe `GiteaStatusPush` is added to the `services` section of the global master config.\n\nThe parameters are as follows:\n\n| Parameter | Value |\n| --- | --- |\n| URL | The URL to the gitea instance. |\n| `token` | Generate an access token in the profile you want the buildbot to impersonate. Make sure the account in gitea has access to the repositories. |\n| `startDescription` | `Renderable` A short description when buildbot starts building on a change. Defaults to `Build started.` |\n| `endDescription` | `Renderable` A short description when buildbot stops building on a change. Defaults to `Build done.` |\n| `context` | `Renderable` The context is an identifier for this status, allowing to identify from which builder this came, defaults to `Interpolate('buildbot/%(prop:buildername)s')` |\n| `context_pr` | `Renderable` The context message to use, when building on a pull request, allowing to identify from which builder this came, defaults to `Interpolate('buildbot/pull_request/%(prop:buildername)s')` |\n| `warningAsSuccess` | Treat warnings as build as success to set in the build status of gitea. If false, warnings will be displayed as warnings. |\n| `verbose` | Perform verbose output |\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/lab132/buildbot-gitea", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "buildbot-gitea", "package_url": "https://pypi.org/project/buildbot-gitea/", "platform": "", "project_url": "https://pypi.org/project/buildbot-gitea/", "project_urls": { "Homepage": "https://github.com/lab132/buildbot-gitea" }, "release_url": "https://pypi.org/project/buildbot-gitea/1.1.0/", "requires_dist": null, "requires_python": "", "summary": "buildbot plugin for integration with Gitea.", "version": "1.1.0" }, "last_serial": 5988607, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "1698ab1b5a54398e3d7706fc140da67c", "sha256": "40f2e098a0ff36143437babbb2316aa289c81acdae9bb04e373a23bffdf53e62" }, "downloads": -1, "filename": "buildbot_gitea-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "1698ab1b5a54398e3d7706fc140da67c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7195, "upload_time": "2019-09-20T16:57:28", "url": "https://files.pythonhosted.org/packages/78/f6/92d6cdc1d06ae0383d3ba5126589a2527014952b6b5a64839dd7a4852ef4/buildbot_gitea-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1b8ff330a1888fdffccf5f51cb50fcce", "sha256": "66519537beeff3d44dc0bef00d458df27d1c273c7171ceda77d9b8a7286c5e9f" }, "downloads": -1, "filename": "buildbot-gitea-0.1.0.tar.gz", "has_sig": false, "md5_digest": "1b8ff330a1888fdffccf5f51cb50fcce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5039, "upload_time": "2019-09-20T16:57:30", "url": "https://files.pythonhosted.org/packages/e0/ff/a93fd7b2101c20d5dec9c3a4df3a46cf47fb967c53e50b78c922003b208b/buildbot-gitea-0.1.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "f7a89ca6d9b59a0dbad3df74e80135e7", "sha256": "dbeb3976dd565425efb73edeaad039627fe7582f8c640d083fefcc1f6b461992" }, "downloads": -1, "filename": "buildbot_gitea-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "f7a89ca6d9b59a0dbad3df74e80135e7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 8782, "upload_time": "2019-09-20T17:00:25", "url": "https://files.pythonhosted.org/packages/c9/d9/8c58713b28baa17884df09e135f80eb208256392848318c8059b087b048b/buildbot_gitea-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "96dcaba5feb202ec5ed38578949c1b8e", "sha256": "4f6df2824eab646cb57357e9b62a48f020d1ae0ea56c1717a3b6b418e764531a" }, "downloads": -1, "filename": "buildbot-gitea-1.0.0.tar.gz", "has_sig": false, "md5_digest": "96dcaba5feb202ec5ed38578949c1b8e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6876, "upload_time": "2019-09-20T17:00:27", "url": "https://files.pythonhosted.org/packages/1a/23/a65b785518e51e41566323fd09f917ae7b6a1a983c7e73410d28674058fc/buildbot-gitea-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "5a8dfd93cc5ef56f0822cce0772413b1", "sha256": "c6f53c98e2d00207a8297956d12be25bb6d07499deaa8c9fbf8141a3cb82f1bb" }, "downloads": -1, "filename": "buildbot_gitea-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "5a8dfd93cc5ef56f0822cce0772413b1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9239, "upload_time": "2019-10-17T09:19:26", "url": "https://files.pythonhosted.org/packages/b4/ef/da132fad0fdcefc00d49dca32e3f085f2115403e91c2376a1f7e889cfa48/buildbot_gitea-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1f9f11bec93271ed553d0ad871696a8a", "sha256": "e1cd24780ca91d1989349bf62052af161fdef83f04f8eaa664221cbcad9daffc" }, "downloads": -1, "filename": "buildbot-gitea-1.1.0.tar.gz", "has_sig": false, "md5_digest": "1f9f11bec93271ed553d0ad871696a8a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7374, "upload_time": "2019-10-17T09:19:27", "url": "https://files.pythonhosted.org/packages/ee/bc/00350f342305e5e4a191b33da2b203c449e03abd1bfb4d591c3df41b687e/buildbot-gitea-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5a8dfd93cc5ef56f0822cce0772413b1", "sha256": "c6f53c98e2d00207a8297956d12be25bb6d07499deaa8c9fbf8141a3cb82f1bb" }, "downloads": -1, "filename": "buildbot_gitea-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "5a8dfd93cc5ef56f0822cce0772413b1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9239, "upload_time": "2019-10-17T09:19:26", "url": "https://files.pythonhosted.org/packages/b4/ef/da132fad0fdcefc00d49dca32e3f085f2115403e91c2376a1f7e889cfa48/buildbot_gitea-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1f9f11bec93271ed553d0ad871696a8a", "sha256": "e1cd24780ca91d1989349bf62052af161fdef83f04f8eaa664221cbcad9daffc" }, "downloads": -1, "filename": "buildbot-gitea-1.1.0.tar.gz", "has_sig": false, "md5_digest": "1f9f11bec93271ed553d0ad871696a8a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7374, "upload_time": "2019-10-17T09:19:27", "url": "https://files.pythonhosted.org/packages/ee/bc/00350f342305e5e4a191b33da2b203c449e03abd1bfb4d591c3df41b687e/buildbot-gitea-1.1.0.tar.gz" } ] }