{ "info": { "author": "Jeff Hammel", "author_email": "k0scist@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "autobot\n=======\n\nbuildbot automation\n\n\nWhat is autobot?\n----------------\n\nautobot is a continuous integration solution built as a front-end to\nbuildbot. We have a lot of software. We're talented, so\nusually it doesn't break. But we're not infalliable. Our robot ally,\nautobot, is there to test things for us. Let's meet autobot!\n\n\nInstalling autobot\n------------------\n\nautobot may be installed using the install script::\n\n curl http://k0s.org/hg/autobot/raw-file/tip/INSTALL.sh | bash\n\nThis will create a virtualenv and install autobot for development\n($VIRTUAL_ENV/src/autobot). You can also use the script as\ninstructions and install it in the same manner as any other python package.\n\n\nSetting up a buildmaster and slave\n----------------------------------\n\nOnce you have autobot installed and the virtualenv activated, you'll\nwant to create a buildmaster and a buildslave.\n\nYou can create a master-slave pair by running ``create-autobot`` after\nactivating the virtualenv. This is mostly useful for autobot\ndevelopment. The scripts ``create-autobot-master`` and\n``create-autobot-slave`` are also available and are more useful for\nproduction, as normally you will not want to keep the master and the\nslave on the same machine except for development and testing. The\nscripts will prompt you for a factory or you can specify one or more\nfrom the commandline using ``--factory`` or ``-f``. The factories are\nfrom ``autobot.projects`` and its subdirectories. You can list the\navailable factories with ``create-autobot --list-factories`` (or\n``create-autobot-master --list-factories``).\n\nRunning ``create-autobot --help`` will give the variables you can set\nwhen it makes a new bot for you (``create-autobot-master`` and\n``create-autobot-slave`` also have a ``--help``, the variables in\n``create-autobot`` being a superset of these).\n\nIf you don't specify a variable, the default will be used to create\nyour particular bot. You can change these in the resultant\nconfiguration later.\n\n\nUsing autobot\n-------------\n\nThe buildmaster and buildslave are started with\n``buildbot start master`` and ``buildslave stop slave`` from the bot's\ndirectories. Respective ``stop`` commands also exist. If you used the\n``create-autobot`` command the generated bot will have a\n``restart_buildbot.py`` script that will stop and start both the\nmaster and slave and (if debug is set) remove the log as well.\n\nThe generated ``master.cfg`` file reads values from a ``master.ini``\nfile in the same directory. The master.ini contains a number of\ndifferent sections:\n\n* ``[:master:]`` contains the top level configuration for the master\n as well as default settings for slaves\n* sections like ``[slave:slavename]`` indicate a slave of name\n ``slavename``\n* all other sections are construction parameters for factories\n\nThe format of the ``.ini`` file is detailed in the subsequent\nsection. You may change which .ini file is used by editing the\n``master.cfg`` file, or, if for whatever reason you don't want to use\nan .ini file as a driver you can construct the appropriate\nconfiguration therein yourself.\n\nAn overview of the build status is detailed at the waterfall display,\nby default at http://localhost:8010/waterfall . To force a build,\nclick on the desired builder and there will be a force build button\ntowards the bottom.\n\nIt is important to remember that continuous integration is a safety\nnet, not a first line of defense. In other words, continue to check\nyour code *before* sending it to autobot.\n\n\n.ini file format\n----------------\n\nAs stated above, a ``master.ini`` file contains three different types\nof sections:\n\n* ``[:master:]`` contains the top level configuration for the master\n as well as default settings for slaves\n* sections like ``[slave:slavename]`` indicate a slave of name\n ``slavename``\n* other sections are construction parameters for factories\n\nWhat goes in each of these?\n\n``:master:`` The master section contains parameters appropriate to the\nbuildmaster:\n\n* slaveport: which port to listen for the slaves on\n* htmlport: which port to serve the waterfall display on\n* pollInterval: how often to poll the repositories, in seconds [DEFAULT: 60]\n* treeStable: how long to wait before the tree settles down before\n building [DEFAULT: 60]\n\nThe other defaults may be seen by running ``create-autobot-master --help``.\n\nOther parameters given in the ``[:master:]`` section are used as the\nbaseline defaults for each slave. They may be overridden in each\n``slave:`` section\n\n----\n\n``slave:`` parameters for each slave:\n\n* password: each slave *must* have a password. Unless there's a\n reason to have a different password per slave, its probably better\n to put this in the ``:master:`` section\n\n* factories: space-separated list of factories to run on that slave.\n If the special value ``*`` is used, all factories will be run. You\n can view the factories available with\n ``create-autobot --list-factories``. The factory name corresponds to\n the directory (or module) name in ``autobot.projects``. If\n every slave is meant to run the same factories, you can put this in\n the ``:master:`` section\n\n* os: the operating system of the slave. Should be one of ``linux``,\n ``win``, or ``mac`` (though see TODO about future use of MozInfo\n making this obselescent). You probably *shouldn't* have a default\n key for this in the ``:master:`` section (though autobot won't try\n to stop you!).\n\n----\n\nfactory sections: All other sections are used to build the factories.\nEach parameter in a factory section is used as a constructor\n(``__init__``) keyword argument when they are created in the\n``master.cfg``. So a factory section like::\n\n [foo]\n bar = fleem\n baz = another parameter\n\nwill invoke the foo factory (lets say it maps to ``MyFooFactory``) on\neach slave like::\n\n MyFooFactory(**dict(bar='fleem', baz='another parameter'))\n\nIn addition, if a factory has a special key, ``platform``, the slave\nwill pass its platform information when instantiating a factory.\nCurrently, this is a dict with a single key, ``os``, but more may be\nadded as needed. As noted in the TODO below, ideally this would be\ndeprecated entirely by MozInfo but such is the interim solution.\n\n\nSources\n-------\n\n``autobot.process.factory:SourceFactory`` is an abstract base class\nfor specifying sources. Sources live as a member on the instance, named\n(oddly) ``sources``. This is a dict with the key being the source\ntype and the value being the source to use. Source types are\ncurrently \"git\" and \"hg\", though this is easily extensible.\n\nInternally, an individual source is stored as a 2-tuple with the first\nitem being the URL of the source and the second item being the\nbranch. If the branch is ``None`` or not specified, this is assumed\nto equate to ``master`` for git or ``default`` for hg. However, you\nmay also use a string in the form of ``URL#branch``. In addition, you\nmay specify a whitespace separated source, which ``SourceFactory``\nwill split into a list of sources.\n\nThe generated ``master.cfg`` polls for changes on the given source,\nthen uses ``buildbot.schedulers.filter:Changefilter`` in conjunction\nwith a ``Scheduler`` to trigger the appropriate builds. This is done\nby ``GitPoller`` and ``HgPoller`` in\n``autobot.changes.poller``. Again, more pollers can be added as\nneeded or the provided buildbot change sources may be utilized.\n\nWhile, in general, the canonical sources should be specified at the\nclass level, if an appropriate argument (e.g. *hg* or *git*) is passed\nin to the ``SourceFactory`` constructor, this will override that\nsource type. This is useful for testing changes on non-canonical URLs\nand/or branches.\n\n\nAdding a New Project\n--------------------\n\nOccassionally, you'll need to add a new project to test. You can add\na ``__init__.py`` file to a directory under ``autobot.projects`` and,\nif you have a factory therein, autobot will find it and add it to the\nlist of factories it knows about.\n\nThere is also a script, ``create-autobot-project``, that can create\nthis stub for you::\n\n Usage: create-autobot-project [options] project \n\n``project`` is the name of the project and ``output``, if specified,\nis the path of the file to create. If output is not specified, it\nwill find its way to a directory named for the project under\n``autobot.projects``.\n\nSeveral factories (``BuildFactory`` descendents) are in\n``autobot.process`` to make building a new project easier:\n\n* ``SourceFactory``: as described above, this processes the sources\n and gives a method (``checkout()``) for downloading them.\n ``master.cfg`` looks in each factory and gleems its needed\n repository from its ``sources`` attribute (if any) in the internal\n storage mechanism of ``SourceFactory`` and sets up schedulers\n accordingly.\n\n* ``VirtualenvFactory``: inherits from ``SourceFactory``. creates a\n python virtualenv and provides build properties ``%(virtualenv)s``,\n ``%(python)s``, and ``%(scripts)s`` (location of ``bin`` on unix or\n ``Scripts`` on windows with respect to the virtualenv. It also has\n a ``findScript()`` method which accepts the unix-style script name\n (no extension) and returns the path to the script on the platform.\n\n* ``PythonSourceFactory``: inherits from ``VirtualenvFactory``. It\n treats *all* (for now, can be changed) sources as sources of python\n packages. In addition to checking them out in\n ``%(virtualenv)s/src``, it will also install them (using\n ``%(python)s setup.py install``)\n\nSee the ``autobot.process.factory`` file for more details. These\nclasses are intended as mix-ins (not my favorite pattern, but it seems\nto basically be what buildbot wants you to do). More work needs to be\ndone to provide for the breadth of use-cases, but what exists now is\nconsidered a \"good start\" versus a \"final form\". More factories may\nbe added per necessity.\n\n\nIs your autobot being feisty?\n-----------------------------\n\nLet me know! I'd like to make autobot a solution that works for all\nstake-holders, and if you're reading this, that means you!\n\nk0scist@gmail.com\n\n\nTODO\n----\n\nNo software of any size is ever finished. Here are a few things I\nwould like to add:\n\n* email notifications\n\n* singular checkout of repos on slaves: the slaves should have a\n singular master repo that is checked out once for each repo URL,\n branch pair. It is then updated as the slaves need and (e.g.)\n cloned from there. This should effectively minimize fetch time.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://k0s.org/hg/autobot", "keywords": "buildbot automation", "license": "MPL", "maintainer": null, "maintainer_email": null, "name": "autobot", "package_url": "https://pypi.org/project/autobot/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/autobot/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://k0s.org/hg/autobot" }, "release_url": "https://pypi.org/project/autobot/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "buildbot front-end incarnation", "version": "0.1.1" }, "last_serial": 1088741, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "6978a3afa2c78d46a1768093efd24147", "sha256": "104aeb7e0c64b4124e05563226e5c3cf5dfc8f2b8dbf216bda6b81b0a1893326" }, "downloads": -1, "filename": "autobot-0.1.tar.gz", "has_sig": false, "md5_digest": "6978a3afa2c78d46a1768093efd24147", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16978, "upload_time": "2014-05-11T17:17:20", "url": "https://files.pythonhosted.org/packages/1e/bb/53c3b56190e051bc8b42af518269a43f5658a7e4e3524f1c7515daf47a5f/autobot-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "4fff55c4ef26f9b6e81ab5abb3749acd", "sha256": "186c63a31a7605612d23322aa65f8f5c17e8996d6a994a0202c3a0165a6ec30a" }, "downloads": -1, "filename": "autobot-0.1.1.tar.gz", "has_sig": false, "md5_digest": "4fff55c4ef26f9b6e81ab5abb3749acd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17003, "upload_time": "2014-05-11T17:54:44", "url": "https://files.pythonhosted.org/packages/60/34/feffa8ae9477ed3a72e059c5686205e3b62b8e85e819338f7cda59e09b74/autobot-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4fff55c4ef26f9b6e81ab5abb3749acd", "sha256": "186c63a31a7605612d23322aa65f8f5c17e8996d6a994a0202c3a0165a6ec30a" }, "downloads": -1, "filename": "autobot-0.1.1.tar.gz", "has_sig": false, "md5_digest": "4fff55c4ef26f9b6e81ab5abb3749acd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17003, "upload_time": "2014-05-11T17:54:44", "url": "https://files.pythonhosted.org/packages/60/34/feffa8ae9477ed3a72e059c5686205e3b62b8e85e819338f7cda59e09b74/autobot-0.1.1.tar.gz" } ] }