├── .coveragerc ├── master ├── buildbot │ ├── steps │ │ ├── __init__.py │ │ ├── package │ │ │ ├── deb │ │ │ │ └── __init__.py │ │ │ ├── __init__.py │ │ │ └── rpm │ │ │ │ └── __init__.py │ │ └── source │ │ │ └── gerrit.py │ ├── changes │ │ └── __init__.py │ ├── clients │ │ └── __init__.py │ ├── db │ │ ├── types │ │ │ ├── __init__.py │ │ │ └── json.py │ │ ├── migrate │ │ │ ├── versions │ │ │ │ ├── __init__.py │ │ │ │ ├── 006_drop_last_access.py │ │ │ │ ├── 020_remove_change_links.py │ │ │ │ ├── 014_add_users_userpass_columns.py │ │ │ │ ├── 003_scheduler_class_name.py │ │ │ │ ├── 024_add_buildslaves_table.py │ │ │ │ ├── 008_add_scheduler_changes_index.py │ │ │ │ ├── 002_add_proj_repo.py │ │ │ │ ├── 022_add_codebase.py │ │ │ │ ├── 009_add_patch_author.py │ │ │ │ └── 016_restore_buildrequest_indices.py │ │ │ ├── README │ │ │ └── migrate.cfg │ │ ├── __init__.py │ │ ├── exceptions.py │ │ └── sourcestampsets.py │ ├── process │ │ ├── __init__.py │ │ ├── users │ │ │ └── __init__.py │ │ └── base.py │ ├── schedulers │ │ ├── __init__.py │ │ └── filter.py │ ├── scripts │ │ ├── __init__.py │ │ ├── trycmd.py │ │ ├── debugclient.py │ │ ├── statuslog.py │ │ ├── statusgui.py │ │ ├── restart.py │ │ ├── buildbot_tac.tmpl │ │ └── tryserver.py │ ├── status │ │ ├── web │ │ │ ├── __init__.py │ │ │ ├── hooks │ │ │ │ └── __init__.py │ │ │ ├── files │ │ │ │ ├── favicon.ico │ │ │ │ ├── bg_gradient.jpg │ │ │ │ ├── retry_large.png │ │ │ │ ├── retry_normal.png │ │ │ │ ├── retry_small.png │ │ │ │ ├── failure_large.png │ │ │ │ ├── failure_normal.png │ │ │ │ ├── failure_small.png │ │ │ │ ├── skipped_large.png │ │ │ │ ├── skipped_normal.png │ │ │ │ ├── skipped_small.png │ │ │ │ ├── success_large.png │ │ │ │ ├── success_normal.png │ │ │ │ ├── success_small.png │ │ │ │ ├── unknown_large.png │ │ │ │ ├── unknown_normal.png │ │ │ │ ├── unknown_small.png │ │ │ │ ├── warnings_large.png │ │ │ │ ├── warnings_small.png │ │ │ │ ├── exception_large.png │ │ │ │ ├── exception_normal.png │ │ │ │ ├── exception_small.png │ │ │ │ ├── warnings_normal.png │ │ │ │ ├── robots.txt │ │ │ │ └── templates_readme.txt │ │ │ ├── templates │ │ │ │ ├── empty.html │ │ │ │ ├── authzfail.html │ │ │ │ ├── authfail.html │ │ │ │ ├── buildstatus.html │ │ │ │ ├── change_sources.html │ │ │ │ ├── feed_sources.html │ │ │ │ ├── onelineperbuildonebuilder.html │ │ │ │ ├── footer.html │ │ │ │ ├── users.html │ │ │ │ ├── change.html │ │ │ │ ├── user.html │ │ │ │ ├── jsonhelp.html │ │ │ │ ├── grid.html │ │ │ │ ├── grid_transposed.html │ │ │ │ ├── feed_description.html │ │ │ │ ├── testresult.html │ │ │ │ ├── about.html │ │ │ │ ├── directory.html │ │ │ │ ├── onelineperbuild.html │ │ │ │ ├── revmacros.html │ │ │ │ ├── feed_rss20.xml │ │ │ │ ├── box_macros.html │ │ │ │ ├── feed_atom10.xml │ │ │ │ ├── grid_macros.html │ │ │ │ └── buildslaves.html │ │ │ └── about.py │ │ ├── html.py │ │ ├── __init__.py │ │ ├── results.py │ │ ├── event.py │ │ └── testresult.py │ ├── test │ │ ├── fake │ │ │ ├── __init__.py │ │ │ ├── state.py │ │ │ ├── change.py │ │ │ └── slave.py │ │ ├── fuzz │ │ │ └── __init__.py │ │ ├── unit │ │ │ ├── __init__.py │ │ │ ├── test_util_sautils.py │ │ │ ├── test_scripts_trycmd.py │ │ │ ├── test_scripts_statuslog.py │ │ │ └── test_util_ansicodes.py │ │ ├── util │ │ │ ├── __init__.py │ │ │ ├── properties.py │ │ │ ├── flaky.py │ │ │ ├── logging.py │ │ │ ├── fuzz.py │ │ │ ├── querylog.py │ │ │ ├── dirs.py │ │ │ └── config.py │ │ ├── interfaces │ │ │ └── __init__.py │ │ ├── integration │ │ │ ├── __init__.py │ │ │ ├── v082.tgz │ │ │ ├── v083.tgz │ │ │ ├── v084.tgz │ │ │ ├── v085.tgz │ │ │ ├── citools.tgz │ │ │ ├── v086p1.tgz │ │ │ ├── v087p1.tgz │ │ │ ├── master-0-7-5.tgz │ │ │ ├── v084-README.txt │ │ │ ├── v085-README.txt │ │ │ ├── v082-README.txt │ │ │ ├── v083-README.txt │ │ │ ├── v087p1-README.txt │ │ │ ├── v086p1-README.txt │ │ │ ├── README.txt │ │ │ ├── citools-README.txt │ │ │ └── master-0-7-5-README.txt │ │ ├── regressions │ │ │ ├── __init__.py │ │ │ └── test_sourcestamp_revision.py │ │ └── __init__.py │ ├── buildbot.png │ ├── buildrequest.py │ ├── errors.py │ ├── buildslave │ │ └── __init__.py │ ├── monkeypatches │ │ ├── testcase_patch.py │ │ ├── decorators.py │ │ ├── sqlalchemy2364.py │ │ ├── python14653.py │ │ └── servicechecks.py │ ├── ec2buildslave.py │ ├── scheduler.py │ ├── libvirtbuildslave.py │ ├── util │ │ ├── ansicodes.py │ │ └── bbcollections.py │ ├── plugins │ │ └── __init__.py │ └── __init__.py ├── docs │ ├── bbdocs │ │ └── __init__.py │ ├── manual │ │ ├── _images │ │ │ ├── .gitignore │ │ │ ├── master.ai │ │ │ ├── slaves.ai │ │ │ ├── status.ai │ │ │ ├── icon.blend │ │ │ ├── master.png │ │ │ ├── overview.ai │ │ │ ├── overview.png │ │ │ ├── slaves.png │ │ │ ├── status.png │ │ │ ├── Makefile │ │ │ ├── status.txt │ │ │ ├── slaves.txt │ │ │ └── overview.txt │ │ ├── index.rst │ │ ├── resources.rst │ │ ├── configuration.rst │ │ └── optimization.rst │ ├── .gitignore │ ├── _static │ │ └── buildbot.ico │ ├── _images │ │ ├── success_normal.png │ │ └── header-text-transparent.png │ ├── tutorial │ │ ├── _images │ │ │ ├── index.png │ │ │ ├── force-build.png │ │ │ ├── irc-testrun.png │ │ │ ├── runtests-success.png │ │ │ └── waterfall-empty.png │ │ ├── index.rst │ │ └── further.rst │ ├── _templates │ │ └── layout.html │ ├── relnotes │ │ ├── 0.3.1.txt │ │ ├── 0.4.1.txt │ │ ├── 0.4.2.txt │ │ ├── 0.3.4.txt │ │ ├── 0.3.2.txt │ │ └── 0.6.6.txt │ ├── developer │ │ ├── cls-irenderable.rst │ │ ├── formats.rst │ │ ├── index.rst │ │ ├── classes.rst │ │ ├── cls-iproperties.rst │ │ ├── encodings.rst │ │ ├── definitions.rst │ │ └── results.rst │ └── index.rst ├── setup.cfg ├── contrib │ ├── trac │ │ ├── bbwatcher │ │ │ ├── __init__.py │ │ │ ├── templates │ │ │ │ ├── bbw_allbuilders.html │ │ │ │ └── bbw_welcome.html │ │ │ ├── model.py │ │ │ └── api.py │ │ ├── TODO.md │ │ ├── setup.py │ │ └── README.md │ ├── systemd │ │ └── buildbot.service │ ├── init-scripts │ │ └── buildmaster.default │ ├── libvirt │ │ └── network.xml │ ├── windows │ │ └── buildbot.bat │ ├── css │ │ ├── sample1.css │ │ └── sample2.css │ ├── os-x │ │ ├── README │ │ └── net.sourceforge.buildbot.master.plist │ ├── zsh │ │ └── _buildbot │ ├── run_maxq.py │ └── fix_changes_pickle_encoding.py ├── bin │ └── buildbot ├── UPGRADING ├── Makefile ├── tox.ini └── MANIFEST.in ├── slave ├── buildslave │ ├── commands │ │ └── __init__.py │ ├── scripts │ │ ├── __init__.py │ │ ├── restart.py │ │ ├── base.py │ │ └── upgrade_slave.py │ ├── test │ │ ├── fake │ │ │ ├── __init__.py │ │ │ ├── remote.py │ │ │ └── slavebuilder.py │ │ ├── unit │ │ │ ├── __init__.py │ │ │ └── test_commands_registry.py │ │ ├── util │ │ │ ├── __init__.py │ │ │ └── compat.py │ │ └── test_extra_coverage.py │ ├── exceptions.py │ └── __init__.py ├── setup.cfg ├── bin │ └── buildslave ├── Makefile ├── UPGRADING ├── MANIFEST.in ├── tox.ini ├── contrib │ ├── systemd │ │ └── buildslave.service │ ├── README.txt │ ├── init-scripts │ │ └── buildslave.default │ ├── windows │ │ └── buildslave.bat │ ├── os-x │ │ ├── README │ │ └── net.sourceforge.buildbot.slave.plist │ ├── zsh │ │ └── _buildslave │ └── bash │ │ └── buildslave └── README ├── common ├── hooks │ └── post-commit ├── pep8rc ├── coveragerc ├── generate_buildbot_api_documentation.sh └── gcode-upload.sh ├── apidocs ├── gen-reference └── Makefile ├── README.pydotorg ├── README ├── .gitignore ├── Makefile └── CONTRIBUTING.md /.coveragerc: -------------------------------------------------------------------------------- 1 | common/coveragerc -------------------------------------------------------------------------------- /master/buildbot/steps/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /master/docs/bbdocs/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /master/buildbot/changes/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /master/buildbot/clients/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /master/buildbot/db/types/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /master/buildbot/process/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /master/buildbot/schedulers/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /master/buildbot/scripts/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /master/buildbot/status/web/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /master/buildbot/test/fake/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /master/buildbot/test/fuzz/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /master/buildbot/test/unit/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /master/buildbot/test/util/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slave/buildslave/commands/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slave/buildslave/scripts/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slave/buildslave/test/fake/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slave/buildslave/test/unit/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /slave/buildslave/test/util/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /master/buildbot/process/users/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /master/buildbot/test/interfaces/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /master/buildbot/db/migrate/versions/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /master/buildbot/steps/package/deb/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /master/buildbot/test/integration/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /master/buildbot/test/regressions/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /master/docs/manual/_images/.gitignore: -------------------------------------------------------------------------------- 1 | *.png 2 | -------------------------------------------------------------------------------- /master/docs/.gitignore: -------------------------------------------------------------------------------- 1 | *.info* 2 | buildbot.html 3 | -------------------------------------------------------------------------------- /master/buildbot/status/web/hooks/__init__.py: -------------------------------------------------------------------------------- 1 | # test 2 | -------------------------------------------------------------------------------- /common/hooks/post-commit: -------------------------------------------------------------------------------- 1 | common/validate.sh HEAD~ --quick 2 | -------------------------------------------------------------------------------- /master/setup.cfg: -------------------------------------------------------------------------------- 1 | [aliases] 2 | test = trial -m buildbot 3 | -------------------------------------------------------------------------------- /slave/setup.cfg: -------------------------------------------------------------------------------- 1 | [aliases] 2 | test = trial -m buildslave 3 | -------------------------------------------------------------------------------- /master/contrib/trac/bbwatcher/__init__.py: -------------------------------------------------------------------------------- 1 | __version__ = '0.1' 2 | -------------------------------------------------------------------------------- /master/bin/buildbot: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from buildbot.scripts import runner 4 | runner.run() 5 | -------------------------------------------------------------------------------- /master/buildbot/buildbot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/buildbot.png -------------------------------------------------------------------------------- /slave/bin/buildslave: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from buildslave.scripts import runner 4 | runner.run() 5 | -------------------------------------------------------------------------------- /master/docs/_static/buildbot.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/docs/_static/buildbot.ico -------------------------------------------------------------------------------- /master/docs/manual/_images/master.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/docs/manual/_images/master.ai -------------------------------------------------------------------------------- /master/docs/manual/_images/slaves.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/docs/manual/_images/slaves.ai -------------------------------------------------------------------------------- /master/docs/manual/_images/status.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/docs/manual/_images/status.ai -------------------------------------------------------------------------------- /master/docs/_images/success_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/docs/_images/success_normal.png -------------------------------------------------------------------------------- /master/docs/manual/_images/icon.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/docs/manual/_images/icon.blend -------------------------------------------------------------------------------- /master/docs/manual/_images/master.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/docs/manual/_images/master.png -------------------------------------------------------------------------------- /master/docs/manual/_images/overview.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/docs/manual/_images/overview.ai -------------------------------------------------------------------------------- /master/docs/manual/_images/overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/docs/manual/_images/overview.png -------------------------------------------------------------------------------- /master/docs/manual/_images/slaves.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/docs/manual/_images/slaves.png -------------------------------------------------------------------------------- /master/docs/manual/_images/status.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/docs/manual/_images/status.png -------------------------------------------------------------------------------- /master/docs/tutorial/_images/index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/docs/tutorial/_images/index.png -------------------------------------------------------------------------------- /master/buildbot/test/integration/v082.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/test/integration/v082.tgz -------------------------------------------------------------------------------- /master/buildbot/test/integration/v083.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/test/integration/v083.tgz -------------------------------------------------------------------------------- /master/buildbot/test/integration/v084.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/test/integration/v084.tgz -------------------------------------------------------------------------------- /master/buildbot/test/integration/v085.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/test/integration/v085.tgz -------------------------------------------------------------------------------- /master/buildbot/status/web/files/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/status/web/files/favicon.ico -------------------------------------------------------------------------------- /master/buildbot/test/integration/citools.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/test/integration/citools.tgz -------------------------------------------------------------------------------- /master/buildbot/test/integration/v086p1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/test/integration/v086p1.tgz -------------------------------------------------------------------------------- /master/buildbot/test/integration/v087p1.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/test/integration/v087p1.tgz -------------------------------------------------------------------------------- /master/docs/tutorial/_images/force-build.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/docs/tutorial/_images/force-build.png -------------------------------------------------------------------------------- /master/docs/tutorial/_images/irc-testrun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/docs/tutorial/_images/irc-testrun.png -------------------------------------------------------------------------------- /master/buildbot/status/web/templates/empty.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | 3 | {% block content %} 4 | {{ content }} 5 | {% endblock %} 6 | -------------------------------------------------------------------------------- /slave/Makefile: -------------------------------------------------------------------------------- 1 | # developer utilities 2 | pylint: 3 | pylint --rcfile=../common/pylintrc buildslave 4 | 5 | pyflakes: 6 | pyflakes buildslave 7 | -------------------------------------------------------------------------------- /slave/UPGRADING: -------------------------------------------------------------------------------- 1 | For information on ugprading a buildslave, see the section "Upgrading an 2 | Existing Buildslave" in the buildbot documentation. 3 | -------------------------------------------------------------------------------- /master/buildbot/status/web/files/bg_gradient.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/status/web/files/bg_gradient.jpg -------------------------------------------------------------------------------- /master/buildbot/status/web/files/retry_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/status/web/files/retry_large.png -------------------------------------------------------------------------------- /master/buildbot/status/web/files/retry_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/status/web/files/retry_normal.png -------------------------------------------------------------------------------- /master/buildbot/status/web/files/retry_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/status/web/files/retry_small.png -------------------------------------------------------------------------------- /master/buildbot/test/integration/master-0-7-5.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/test/integration/master-0-7-5.tgz -------------------------------------------------------------------------------- /master/docs/_images/header-text-transparent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/docs/_images/header-text-transparent.png -------------------------------------------------------------------------------- /master/docs/tutorial/_images/runtests-success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/docs/tutorial/_images/runtests-success.png -------------------------------------------------------------------------------- /master/docs/tutorial/_images/waterfall-empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/docs/tutorial/_images/waterfall-empty.png -------------------------------------------------------------------------------- /master/buildbot/db/migrate/README: -------------------------------------------------------------------------------- 1 | This is a database migration repository. 2 | 3 | More information at 4 | http://code.google.com/p/sqlalchemy-migrate/ 5 | -------------------------------------------------------------------------------- /master/buildbot/status/web/files/failure_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/status/web/files/failure_large.png -------------------------------------------------------------------------------- /master/buildbot/status/web/files/failure_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/status/web/files/failure_normal.png -------------------------------------------------------------------------------- /master/buildbot/status/web/files/failure_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/status/web/files/failure_small.png -------------------------------------------------------------------------------- /master/buildbot/status/web/files/skipped_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/status/web/files/skipped_large.png -------------------------------------------------------------------------------- /master/buildbot/status/web/files/skipped_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/status/web/files/skipped_normal.png -------------------------------------------------------------------------------- /master/buildbot/status/web/files/skipped_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/status/web/files/skipped_small.png -------------------------------------------------------------------------------- /master/buildbot/status/web/files/success_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/status/web/files/success_large.png -------------------------------------------------------------------------------- /master/buildbot/status/web/files/success_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/status/web/files/success_normal.png -------------------------------------------------------------------------------- /master/buildbot/status/web/files/success_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/status/web/files/success_small.png -------------------------------------------------------------------------------- /master/buildbot/status/web/files/unknown_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/status/web/files/unknown_large.png -------------------------------------------------------------------------------- /master/buildbot/status/web/files/unknown_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/status/web/files/unknown_normal.png -------------------------------------------------------------------------------- /master/buildbot/status/web/files/unknown_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/status/web/files/unknown_small.png -------------------------------------------------------------------------------- /master/buildbot/status/web/files/warnings_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/status/web/files/warnings_large.png -------------------------------------------------------------------------------- /master/buildbot/status/web/files/warnings_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/status/web/files/warnings_small.png -------------------------------------------------------------------------------- /master/buildbot/status/web/files/exception_large.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/status/web/files/exception_large.png -------------------------------------------------------------------------------- /master/buildbot/status/web/files/exception_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/status/web/files/exception_normal.png -------------------------------------------------------------------------------- /master/buildbot/status/web/files/exception_small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/status/web/files/exception_small.png -------------------------------------------------------------------------------- /master/buildbot/status/web/files/warnings_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/python/buildbot/pydotorg/master/buildbot/status/web/files/warnings_normal.png -------------------------------------------------------------------------------- /master/buildbot/test/integration/v084-README.txt: -------------------------------------------------------------------------------- 1 | -- Basic v0.8.4 tarball -- 2 | 3 | This tarball is the result of a few runs from a few incarnations of a master 4 | that was running Buildbot-0.8.4. 5 | -------------------------------------------------------------------------------- /master/buildbot/test/integration/v085-README.txt: -------------------------------------------------------------------------------- 1 | -- Basic v0.8.5 tarball -- 2 | 3 | This tarball is the result of a few runs from a single incarnation of a master 4 | that was running Buildbot-0.8.5. 5 | -------------------------------------------------------------------------------- /master/UPGRADING: -------------------------------------------------------------------------------- 1 | For information on ugprading Buildbot, see the section "Upgrading an Existing 2 | Buildmaster" in the buildbot documentation. 3 | 4 | This may be found locally in docs/installation.texinfo. 5 | -------------------------------------------------------------------------------- /master/docs/tutorial/index.rst: -------------------------------------------------------------------------------- 1 | Buildbot Tutorial 2 | ================= 3 | 4 | Contents: 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | firstrun 10 | docker 11 | tour 12 | further 13 | -------------------------------------------------------------------------------- /master/docs/_templates/layout.html: -------------------------------------------------------------------------------- 1 | {% extends "!layout.html" %} 2 | {%- block sidebartoc %} 3 |

{{ _('Table Of Contents') }}

4 | {{ toctree(collapse=True, maxdepth=-1, titles_only=True) }} 5 | {%- endblock %} 6 | -------------------------------------------------------------------------------- /master/Makefile: -------------------------------------------------------------------------------- 1 | # developer utilities 2 | pylint: 3 | pylint --rcfile=../common/pylintrc buildbot 4 | tutorial: 5 | cd docs/tutorial; $(MAKE) html 6 | pyflakes: 7 | pyflakes buildbot 8 | rmpyc: 9 | make -C .. rmpyc 10 | -------------------------------------------------------------------------------- /master/docs/tutorial/further.rst: -------------------------------------------------------------------------------- 1 | Further Reading 2 | =============== 3 | 4 | See the following user-contributed tutorials for other highlights and ideas: 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | fiveminutes 10 | -------------------------------------------------------------------------------- /master/contrib/trac/TODO.md: -------------------------------------------------------------------------------- 1 | The plan is to eventually offer the same controls that webstatus does. 2 | 3 | # Missing 4 | * Force Builds 5 | * The grid display 6 | * The waterfall display (replaced by a Timeline contributor for Trac) 7 | -------------------------------------------------------------------------------- /slave/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include MANIFEST.in README NEWS COPYING UPGRADING 2 | include bin/buildslave 3 | include docs/buildslave.1 4 | 5 | include contrib/windows/* contrib/os-x/* contrib/init-scripts/* 6 | include contrib/zsh/* contrib/bash/* 7 | -------------------------------------------------------------------------------- /master/buildbot/status/web/templates/authzfail.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | 3 | {% block content %} 4 | 5 |

Authorization Failed

6 | 7 |

You are not allowed to perform this action. 8 |

9 | 10 | {% endblock %} 11 | -------------------------------------------------------------------------------- /master/buildbot/test/integration/v082-README.txt: -------------------------------------------------------------------------------- 1 | -- Basic v0.8.2 tarball -- 2 | 3 | This tarball is the result of a few runs from a few incarnations of a master 4 | that was running Buildbot-0.8.2. It represents a decent set of claimed 5 | builds. 6 | -------------------------------------------------------------------------------- /master/buildbot/test/integration/v083-README.txt: -------------------------------------------------------------------------------- 1 | -- Basic v0.8.3 tarball -- 2 | 3 | This tarball is the result of a few runs from a few incarnations of a master 4 | that was running Buildbot-0.8.3. It represents a decent set of claimed 5 | builds. 6 | -------------------------------------------------------------------------------- /master/buildbot/test/integration/v087p1-README.txt: -------------------------------------------------------------------------------- 1 | -- Basic v0.8.7p1 tarball -- 2 | 3 | This tarball is the result of a couple of runs from a single 4 | incarnation of a master that was running Buildbot-0.8.7p1. Both 5 | builds were successful. 6 | -------------------------------------------------------------------------------- /master/buildbot/test/integration/v086p1-README.txt: -------------------------------------------------------------------------------- 1 | -- Basic v0.8.6p1 tarball -- 2 | 3 | This tarball is the result of a few runs from a single incarnation of a master 4 | that was running Buildbot-0.8.6p1. It has only one build, which was 5 | interrupted. 6 | -------------------------------------------------------------------------------- /master/buildbot/test/integration/README.txt: -------------------------------------------------------------------------------- 1 | "Integration" tests are tests that exercise a significant chunk of the 2 | Buildbot code, and thus do not really count as unit tests. 3 | 4 | When debugging, get the unit tests working first, *then* work on the 5 | integration tests. 6 | -------------------------------------------------------------------------------- /master/buildbot/status/web/files/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: /waterfall 3 | Disallow: /builders 4 | Disallow: /changes 5 | Disallow: /buildslaves 6 | Disallow: /schedulers 7 | Disallow: /one_line_per_build 8 | Disallow: /grid 9 | Disallow: /tgrid 10 | Disallow: /json 11 | -------------------------------------------------------------------------------- /master/buildbot/test/integration/citools-README.txt: -------------------------------------------------------------------------------- 1 | -- citools historical master tarball -- 2 | 3 | This tarball was donated by Lukas Linhart and represents a real-world set of 4 | changes, builder pickles, build pickles, and logfiles. 5 | 6 | This was generated with a 0.7.11p1 master. 7 | -------------------------------------------------------------------------------- /master/buildbot/status/web/templates/authfail.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | 3 | {% block content %} 4 | 5 |

Authentication Failed

6 | 7 |

The username or password you entered were not correct. 8 | Please go back and try again. 9 |

10 | 11 | {% endblock %} 12 | -------------------------------------------------------------------------------- /apidocs/gen-reference: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo $(dirname $0) 3 | cd $(dirname $0) 4 | cd .. 5 | find master slave -name '*.pyc' -exec rm \{} \; || exit 1 6 | # excludes both test suites 7 | python docs/epyrun -o docs/reference --exclude="buildbot\\.test" --exclude="buildslave\\.test" buildbot buildslave 8 | -------------------------------------------------------------------------------- /master/tox.ini: -------------------------------------------------------------------------------- 1 | # Tox (http://tox.testrun.org/) is a tool for running tests 2 | # in multiple virtualenvs. This configuration file will run the 3 | # test suite on all supported python versions. To use it, "pip install tox" 4 | # and then run "tox" from this directory. 5 | 6 | [tox] 7 | envlist = py25, py26, py27 8 | 9 | [testenv] 10 | commands = python setup.py test 11 | -------------------------------------------------------------------------------- /slave/tox.ini: -------------------------------------------------------------------------------- 1 | # Tox (http://tox.testrun.org/) is a tool for running tests 2 | # in multiple virtualenvs. This configuration file will run the 3 | # test suite on all supported python versions. To use it, "pip install tox" 4 | # and then run "tox" from this directory. 5 | 6 | [tox] 7 | envlist = py24, py25, py26, py27 8 | 9 | [testenv] 10 | commands = python setup.py test 11 | -------------------------------------------------------------------------------- /master/docs/manual/index.rst: -------------------------------------------------------------------------------- 1 | This is the BuildBot manual for Buildbot version |version|. 2 | 3 | Buildbot Manual 4 | --------------- 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | introduction 10 | installation 11 | concepts 12 | configuration 13 | customization 14 | new-style-steps 15 | cmdline 16 | resources 17 | optimization 18 | plugins 19 | -------------------------------------------------------------------------------- /master/buildbot/status/web/templates/buildstatus.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | {% from "box_macros.html" import box %} 3 | 4 | {% block header %} 5 | {% endblock %} 6 | 7 | {% block barecontent %} 8 | 9 | {% for r in rows %} 10 | {{ box(**r) }} 11 | {% endfor %} 12 | 13 | {{ box(**build) }} 14 |
15 | {% endblock %} 16 | 17 | {% block footer %} 18 | {% endblock %} 19 | 20 | -------------------------------------------------------------------------------- /apidocs/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all reference cleanpyc 2 | 3 | all: reference.tgz 4 | 5 | cleanpyc: 6 | cd .. && find master slave -name '*.pyc' -exec rm \{} \; || exit 1 7 | 8 | reference: cleanpyc 9 | rm -rf reference 10 | cd .. && python apidocs/epyrun -o apidocs/reference \ 11 | --exclude="buildbot\\.test" --exclude="buildslave\\.test" \ 12 | buildbot buildslave 13 | 14 | reference.tgz: reference 15 | tar -zcf reference.tgz reference 16 | -------------------------------------------------------------------------------- /master/buildbot/status/web/templates/change_sources.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | 3 | {% block content %} 4 | 5 |

Changesources

6 | 7 |
8 | 9 | {% if sources %} 10 |
    11 | {% for s in sources -%} 12 |
  1. {{ s.describe() }}
  2. 13 | {% endfor -%} 14 |
15 | {% else %} 16 | none (push only) 17 | {% endif %} 18 | 19 |
20 | 21 | {% endblock %} 22 | -------------------------------------------------------------------------------- /README.pydotorg: -------------------------------------------------------------------------------- 1 | This branch contains changes specific to the python-dev 2 | installation of buildbot. 3 | 4 | When making new such changes, commit them into the pydotorg 5 | branch, and then merge this branch into the maintenance branch 6 | that is currently use (0.8.2 at the point of this writing). 7 | 8 | Should be installed using: 9 | cd master 10 | python setup.py install --root /data/buildbot/ --install-lib /lib/python --install-scripts /bin 11 | -------------------------------------------------------------------------------- /master/contrib/systemd/buildbot.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Buildbot Master 3 | Wants=network.target 4 | After=network.target 5 | 6 | [Service] 7 | Type=forking 8 | PIDFile=/srv/buildbot/master/twistd.pid 9 | WorkingDirectory=/srv/buildbot 10 | ExecStart=/usr/bin/buildbot start master 11 | ExecReload=/usr/bin/buildbot reconfig master 12 | ExecStop=/usr/bin/buildbot stop master 13 | Restart=always 14 | User=buildbot 15 | 16 | [Install] 17 | WantedBy=multi-user.target 18 | -------------------------------------------------------------------------------- /master/buildbot/status/web/templates/feed_sources.html: -------------------------------------------------------------------------------- 1 | {% macro srcs_desc(src) -%} 2 |
3 | {%- if src.codebase -%} 4 | Codebase: {{ src.codebase }}
5 | {% endif %} 6 |

7 | Repository: {{ src.repository }}
8 | {%- if src.branch -%} 9 | Branch: {{ src.branch }}
10 | {% endif %} 11 | {%- if src.revision -%} 12 | Revision: {{ src.revision }}
13 | {% endif %} 14 |

15 |
16 | {%- endmacro %} 17 | -------------------------------------------------------------------------------- /master/buildbot/status/web/templates/onelineperbuildonebuilder.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | {% from 'build_line.html' import build_line %} 3 | 4 | {% block content %} 5 | 6 |

Last {{ num_builds }} builds of builder {{ builder_name|e }}: 7 | {{ branches|join(', ')|e }} 8 |

9 | 10 | 17 | 18 | {% endblock %} 19 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | BuildBot: build/test automation 2 | http://buildbot.net 3 | Brian Warner 4 | Dustin J. Mitchell 5 | 6 | Buildbot consists of two separate components: the master and the slave. See 7 | master/README and slave/README for more information. 8 | 9 | Related repositories: 10 | https://github.com/buildbot/buildbot-media - Buildbot-related media 11 | https://github.com/buildbot/buildbot-website - Source for http://buildbot.net 12 | -------------------------------------------------------------------------------- /master/docs/relnotes/0.3.1.txt: -------------------------------------------------------------------------------- 1 | Buildbot 0.3.1 was released 29 Apr 2003 2 | 3 | ** First release. 4 | 5 | ** Features implemented: 6 | 7 | change notification from FreshCVS server or parsed maildir contents 8 | 9 | timed builds 10 | 11 | basic builds, configure/compile/test 12 | 13 | some Twisted-specific build steps: docs, unit tests, debuild 14 | 15 | status reporting via web page 16 | 17 | ** Features still experimental/unpolished 18 | 19 | status reporting via PB client 20 | 21 | -------------------------------------------------------------------------------- /master/buildbot/status/web/templates/footer.html: -------------------------------------------------------------------------------- 1 |
2 | 23 | 24 | -------------------------------------------------------------------------------- /slave/contrib/systemd/buildslave.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Buildbot Slave 3 | Wants=network.target 4 | After=network.target 5 | 6 | [Service] 7 | Type=forking 8 | PIDFile=/srv/buildslave/linux-slave/twistd.pid 9 | WorkingDirectory=/srv/buildslave 10 | ExecStart=/usr/bin/buildslave start linux-slave 11 | ExecReload=/usr/bin/buildslave restart linux-slave 12 | ExecStop=/usr/bin/buildslave stop linux-slave 13 | Restart=always 14 | User=buildslave 15 | 16 | [Install] 17 | WantedBy=multi-user.target 18 | -------------------------------------------------------------------------------- /master/docs/manual/_images/Makefile: -------------------------------------------------------------------------------- 1 | 2 | SOURCES = overview.svg slaves.svg master.svg status.svg 3 | PNGS = $(patsubst %.svg,%.png,$(SOURCES)) 4 | EPSS = $(patsubst %.svg,%.eps,$(SOURCES)) 5 | 6 | .PHONY: images-png images-eps 7 | all: $(PNGS) $(EPSS) 8 | images-png: $(PNGS) 9 | images-eps: $(EPSS) 10 | 11 | %.png: %.svg 12 | inkscape -b white --export-png $@ $< 13 | mogrify -trim +repage $@ 14 | %.eps: %.svg 15 | inkscape --export-eps $@ $< 16 | mogrify -trim +repage $@ 17 | clean: 18 | rm -f *.png *.eps 19 | -------------------------------------------------------------------------------- /master/docs/manual/resources.rst: -------------------------------------------------------------------------------- 1 | .. _Resources: 2 | 3 | Resources 4 | ========= 5 | 6 | The Buildbot home page is http://buildbot.net/. 7 | 8 | For configuration questions and general discussion, please use the ``buildbot-devel`` mailing list. 9 | The subscription instructions and archives are available at http://lists.sourceforge.net/lists/listinfo/buildbot-devel 10 | 11 | The ``#buildbot`` channel on Freenode's IRC servers hosts development discussion, and often folks are available to answer questions there, as well. 12 | -------------------------------------------------------------------------------- /master/buildbot/status/web/templates/users.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | 3 | {% block content %} 4 | 5 |

Users

6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | {% for user in users %} 15 | 16 | 17 | 18 | 19 | 20 | 21 | {% endfor %} 22 | 23 |
UidIdentifier
{{ user.uid }}{{ user.identifier|e }}
24 | 25 | 26 | 27 | {% endblock %} 28 | -------------------------------------------------------------------------------- /master/buildbot/status/web/files/templates_readme.txt: -------------------------------------------------------------------------------- 1 | This is the directory to place customized templates for webstatus. 2 | 3 | You can find the sources for the templates used in: 4 | buildbot/status/web/templates 5 | 6 | You can copy any of those files to this directory, make changes, and buildbot will automatically 7 | use your modified templates. 8 | 9 | Also of note is that you will not need to restart/reconfig buildbot master to have these changes take effect. 10 | 11 | The syntax of the templates is Jinja2: 12 | http://jinja.pocoo.org/ -------------------------------------------------------------------------------- /master/buildbot/status/web/templates/change.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | {% from "change_macros.html" import change with context %} 3 | {% import 'forms.html' as forms %} 4 | 5 | {% block content %} 6 | 7 |

{{ pageTitle }}

8 | 9 |
10 | 11 | {{ change(c) }} 12 | 13 | {% if authz.advertiseAction('stopChange', request) %} 14 |

Cancel Builds For Change:

15 | {{ forms.stop_change_builds("/builders/_all/stopchangeall", c.number, authz) }} 16 | {% endif %} 17 | 18 |
19 | 20 | {% endblock %} 21 | -------------------------------------------------------------------------------- /master/buildbot/status/web/templates/user.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | 3 | {% block content %} 4 | 5 |

User: {{ user_identifier|e }}

6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | {% for attr in user %} 17 | 18 | 19 | 20 | 21 | 22 | 23 | {% endfor %} 24 | 25 |
Attribute TypeAttribute Value
{{ attr|e }}{{ user[attr]|e }}
26 | 27 |
28 | 29 | {% endblock %} 30 | -------------------------------------------------------------------------------- /master/docs/developer/cls-irenderable.rst: -------------------------------------------------------------------------------- 1 | .. index:: single: Properties; IRenderable 2 | 3 | IRenderable 4 | =========== 5 | 6 | .. class:: buildbot.interfaces.IRenderable:: 7 | 8 | Providers of this class can be "rendered", based on available properties, when a build is started. 9 | 10 | .. method:: getRenderingFor(iprops) 11 | 12 | :param iprops: the :class:`~buildbot.interfaces.IProperties` provider supplying the properties of the build. 13 | 14 | Returns the interpretation of the given properties, optionally in a Deferred. 15 | -------------------------------------------------------------------------------- /master/contrib/trac/setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup 2 | 3 | from bbwatcher import __version__ 4 | 5 | setup( 6 | name='Trac-BuildBot-Watcher', 7 | version=__version__, 8 | packages=['bbwatcher'], 9 | package_data={ 10 | 'bbwatcher': ['htdocs/*', 'templates/*.html'], 11 | }, 12 | author='Randall Bosetti', 13 | description='A plugin to fetch/integrate status updates from the BuildBot XML-RPC interface', 14 | license='GPL', 15 | entry_points={ 16 | 'trac.plugins': 'bbwatcher.web_ui=bbwatcher.web_ui', 17 | } 18 | ) 19 | -------------------------------------------------------------------------------- /slave/contrib/README.txt: -------------------------------------------------------------------------------- 1 | Utility scripts, things contributed by users but not strictly a part of 2 | buildbot: 3 | 4 | zsh/_buildslave: zsh tab-completion file for 'buildslave' command. Put it in 5 | one of the directories appearing in $fpath to enable 6 | tab-completion in zsh. 7 | 8 | bash/buildslave: bash tab-completion file for 'buildslave' command. Source this 9 | file to enable completions in your bash session. This is 10 | typically accomplished by placing the file into the 11 | appropriate 'bash_completion.d' directory. 12 | -------------------------------------------------------------------------------- /master/buildbot/status/web/templates/jsonhelp.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | {% block content %} 3 | 4 |

{{ text }}

5 |

More Help:

6 | 7 | {% if level != 1 %} 8 |

Parent's Help

9 | {% endif %} 10 | 11 | {% if children %} 12 |

Child Nodes

13 | 20 | {% endif %} 21 | 22 |

Flags:

23 | {{ flags }} 24 | 25 |

Examples:

26 | {{ examples }} 27 | 28 | {% endblock %} 29 | -------------------------------------------------------------------------------- /master/docs/developer/formats.rst: -------------------------------------------------------------------------------- 1 | File Formats 2 | ============ 3 | 4 | Log File Format 5 | --------------- 6 | 7 | .. py:class:: buildbot.status.logfile.LogFile 8 | 9 | The master currently stores each logfile in a single file, which may have a 10 | standard compression applied. 11 | 12 | The format is a special case of the netstrings protocol - see 13 | http://cr.yp.to/proto/netstrings.txt. The text in each netstring 14 | consists of a one-digit channel identifier followed by the data from that 15 | channel. 16 | 17 | The formatting is implemented in the LogFile class in 18 | :file:`buildbot/status/logfile.py`, and in particular by the :meth:`merge` 19 | method. 20 | 21 | 22 | -------------------------------------------------------------------------------- /master/docs/developer/index.rst: -------------------------------------------------------------------------------- 1 | .. _Buildbot Development: 2 | 3 | Buildbot Development 4 | ==================== 5 | 6 | This chapter is the official repository for the collected wisdom of the Buildbot hackers. 7 | It is intended both for developers writing patches that will be included in Buildbot itself, and for advanced users who wish to customize Buildbot. 8 | 9 | .. toctree:: 10 | :maxdepth: 2 11 | 12 | master-overview 13 | definitions 14 | style 15 | tests 16 | config 17 | utils 18 | database 19 | results 20 | formats 21 | webstatus 22 | master-slave 23 | encodings 24 | metrics 25 | plugins-publish 26 | classes 27 | -------------------------------------------------------------------------------- /master/docs/developer/classes.rst: -------------------------------------------------------------------------------- 1 | Classes 2 | ======= 3 | 4 | The sections contained here document classes that can be used or subclassed. 5 | 6 | .. note:: 7 | Some of this information duplicates information available in the source 8 | code itself. Consider this information authoritative, and the source code 9 | a demonstration of the current implementation which is subject to change. 10 | 11 | .. toctree:: 12 | :maxdepth: 1 13 | 14 | cls-buildfactory 15 | cls-buildsetsummarynotifiermixin 16 | cls-remotecommands 17 | cls-buildsteps 18 | cls-forcesched 19 | cls-irenderable 20 | cls-iproperties 21 | 22 | .. todo:: 23 | 24 | cls-logobserver 25 | -------------------------------------------------------------------------------- /master/buildbot/status/web/templates/grid.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | {% import 'grid_macros.html' as grid with context %} 3 | 4 | {% block content %} 5 | 6 |

Grid View

7 | 8 | 9 | 10 | 11 | 14 | 15 | {% for s in stamps %} 16 | {{ grid.stamp_td(s) }} 17 | {% endfor %} 18 | 19 | 20 | {% for builder in builders %} 21 | 22 | {{ grid.builder_td(builder) }} 23 | {% for build in builder.builds %} 24 | {{ grid.build_td(build) }} 25 | {% endfor %} 26 | 27 | {% endfor %} 28 | 29 |
{{ title }} 12 | {{ grid.tag_title() }} 13 |
30 | 31 | {% endblock %} 32 | -------------------------------------------------------------------------------- /slave/contrib/init-scripts/buildslave.default: -------------------------------------------------------------------------------- 1 | SLAVE_RUNNER=/usr/bin/buildslave 2 | 3 | # NOTE: SLAVE_ENABLED has changed its behaviour in version 0.8.4. Use 4 | # 'true|yes|1' to enable instance and 'false|no|0' to disable. Other 5 | # values will be considered as syntax error. 6 | 7 | SLAVE_ENABLED[1]=0 # 1-enabled, 0-disabled 8 | SLAVE_NAME[1]="buildslave #1" # short name printed on start/stop 9 | SLAVE_USER[1]="buildbot" # user to run slave as 10 | SLAVE_BASEDIR[1]="" # basedir to slave (absolute path) 11 | SLAVE_OPTIONS[1]="" # buildbot options 12 | SLAVE_PREFIXCMD[1]="" # prefix command, i.e. nice, linux32, dchroot 13 | -------------------------------------------------------------------------------- /master/contrib/init-scripts/buildmaster.default: -------------------------------------------------------------------------------- 1 | MASTER_RUNNER=/usr/bin/buildbot 2 | 3 | # NOTE: MASTER_ENABLED has changed its behaviour in version 0.8.4. Use 4 | # 'true|yes|1' to enable instance and 'false|no|0' to disable. Other 5 | # values will be considered as syntax error. 6 | 7 | MASTER_ENABLED[1]=0 # 1-enabled, 0-disabled 8 | MASTER_NAME[1]="buildmaster #1" # short name printed on start/stop 9 | MASTER_USER[1]="buildbot" # user to run master as 10 | MASTER_BASEDIR[1]="" # basedir to master (absolute path) 11 | MASTER_OPTIONS[1]="" # buildbot options 12 | MASTER_PREFIXCMD[1]="" # prefix command, i.e. nice, linux32, dchroot 13 | -------------------------------------------------------------------------------- /master/buildbot/status/web/templates/grid_transposed.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | {% import 'grid_macros.html' as grid with context %} 3 | 4 | {% block content %} 5 | 6 |

Transposed Grid View

7 | 8 | 9 | 10 | 11 | 14 | {% for builder in builders %} 15 | {{ grid.builder_td(builder) }} 16 | {% endfor %} 17 | 18 | 19 | {% for i in range %} 20 | 21 | {{ grid.stamp_td(stamps[i]) }} 22 | {% for b in builder_builds %} 23 | {{ grid.build_td(b[i]) }} 24 | {% endfor %} 25 | 26 | {% endfor %} 27 | 28 |
{{ title }} 12 | {{ grid.tag_title() }} 13 |
29 | 30 | {% endblock %} 31 | -------------------------------------------------------------------------------- /master/buildbot/status/web/templates/feed_description.html: -------------------------------------------------------------------------------- 1 | {% from 'feed_sources.html' import srcs_desc %} 2 | 3 | {% macro item_desc(b, title_url, title) -%} 4 |

5 | Date: {{ b.date }}
6 | Project home: {{ title|e }}
7 | Builder summary: {{ b.name }}
8 | Build details: Build {{ b.number }}
9 | Author list: {{ b.responsible_users|join(', ')|e }}
10 | Failed step(s): {{ b.failed_steps|join(', ') }}
11 |

12 | {% for src in b.sources %} 13 | {{ srcs_desc(src) }} 14 | {% endfor %} 15 |

16 | Last lines of the build log: 17 |

18 | {%- endmacro %} 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # All files to globally ignore 2 | *.pyc 3 | *.pyo 4 | *$py.class 5 | # vim trash: 6 | .*.sw[a-z] 7 | *.patch 8 | *.orig 9 | *.rej 10 | *# 11 | *~ 12 | MANIFEST 13 | _trial_temp* 14 | dist 15 | build 16 | .build 17 | *.egg-info 18 | master/docs/buildbot.html 19 | master/docs/buildbot.info 20 | master/docs/buildbot.info-1 21 | master/docs/buildbot.info-2 22 | .stgit-edit.txt 23 | .project 24 | .pydevproject 25 | .settings 26 | master/docs/buildbot 27 | master/docs/version.texinfo 28 | master/docs/docs.tgz 29 | master/docs/latest 30 | twisted/plugins/dropin.cache 31 | .coverage 32 | coverage-html 33 | apidocs/reference 34 | apidocs/reference.tgz 35 | common/googlecode_upload.py 36 | master/docs/tutorial/_build 37 | _build 38 | .tox 39 | /www 40 | -------------------------------------------------------------------------------- /master/contrib/libvirt/network.xml: -------------------------------------------------------------------------------- 1 | 2 | buildbot-network 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /master/buildbot/db/__init__.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | -------------------------------------------------------------------------------- /master/contrib/windows/buildbot.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM This file is used to run buildbot when installed into a python installation or deployed in virtualenv 3 | 4 | setlocal 5 | set BB_BUILDBOT="%~dp0buildbot" 6 | 7 | IF EXIST "%~dp0..\python.exe" ( 8 | REM Normal system install of python (buildbot.bat is in scripts dir, just below python.exe) 9 | set BB_PYTHON="%~dp0..\python" 10 | ) ELSE IF EXIST "%~dp0python.exe" ( 11 | REM virtualenv install (buildbot.bat is in same dir as python.exe) 12 | set BB_PYTHON="%~dp0python" 13 | ) ELSE ( 14 | REM Not found nearby. Use system version and hope for the best 15 | echo Warning! Unable to find python.exe near buildbot.bat. Using python on PATH, which might be a mismatch. 16 | echo. 17 | set BB_PYTHON=python 18 | ) 19 | 20 | %BB_PYTHON% %BB_BUILDBOT% %* 21 | 22 | exit /b %ERRORLEVEL% -------------------------------------------------------------------------------- /master/buildbot/db/exceptions.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | 17 | class DatabaseNotReadyError(Exception): 18 | pass 19 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # developer utilities 2 | 3 | .PHONY: docs apidocs pylint artifacts 4 | 5 | docs: 6 | $(MAKE) -C master/docs 7 | 8 | apidocs: 9 | $(MAKE) -C apidocs 10 | 11 | pylint: 12 | $(MAKE) -C master pylint; master_res=$$?; \ 13 | $(MAKE) -C slave pylint; slave_res=$$?; \ 14 | if [ $$master_res != 0 ] || [ $$slave_res != 0 ]; then exit 1; fi 15 | 16 | pyflakes: 17 | pyflakes master/buildbot slave/buildslave 18 | 19 | pep8: 20 | pep8 --config=common/pep8rc master slave 21 | 22 | # TODO(sa2ajj): make it a non-phony target 23 | artifacts: DEST_DIR := $(CURDIR)/dist 24 | artifacts: 25 | @rm -rf $(DEST_DIR) 26 | @mkdir -p $(DEST_DIR) 27 | @for name in master slave; do (rm -f $$name/MANIFEST; cd $$name; python setup.py sdist --formats gztar,zip -d $(DEST_DIR)); done 28 | 29 | rmpyc: 30 | find . \( -name '*.pyc' -o -name '*.pyo' \) -exec rm -v {} \; 31 | -------------------------------------------------------------------------------- /master/contrib/trac/bbwatcher/templates/bbw_allbuilders.html: -------------------------------------------------------------------------------- 1 | 4 | 7 | 8 | 9 | 10 | $title 11 | 12 | 13 | 14 | 15 |
16 |

Active Builders

17 |
    18 |
  1. 19 | ${name} 20 |
  2. 21 |
22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /slave/contrib/windows/buildslave.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM This file is used to run buildslave when installed into a python installation or deployed in virtualenv 3 | 4 | setlocal 5 | set BB_BUILDSLAVE="%~dp0buildslave" 6 | 7 | IF EXIST "%~dp0..\python.exe" ( 8 | REM Normal system install of python (buildslave.bat is in scripts dir, just below python.exe) 9 | set BB_PYTHON="%~dp0..\python" 10 | ) ELSE IF EXIST "%~dp0python.exe" ( 11 | REM virtualenv install (buildslave.bat is in same dir as python.exe) 12 | set BB_PYTHON="%~dp0python" 13 | ) ELSE ( 14 | REM Not found nearby. Use system version and hope for the best 15 | echo Warning! Unable to find python.exe near buildslave.bat. Using python on PATH, which might be a mismatch. 16 | echo. 17 | set BB_PYTHON=python 18 | ) 19 | 20 | %BB_PYTHON% %BB_BUILDSLAVE% %* 21 | 22 | exit /b %ERRORLEVEL% 23 | -------------------------------------------------------------------------------- /common/pep8rc: -------------------------------------------------------------------------------- 1 | [pep8] 2 | show-source = yes 3 | statistics = yes 4 | count = yes 5 | max-line-length = 100 6 | 7 | # List of currently ignored PEP8 issues. Some of them definetely should be 8 | # enabled in future. 9 | # 10 | # E122 continuation line missing indentation or outdented 11 | # E123 closing bracket does not match indentation of opening bracket's line 12 | # (pep8 seems to misdiagnose this) 13 | # E126 continuation line over-indented for hanging indent 14 | # E128 continuation line under-indented for visual indent 15 | # E211 whitespace before '(' 16 | # E501 line too long (102 > 100 characters) 17 | # E711 comparison to None should be 'if cond is None:' 18 | # E712 comparison to False should be 'if cond is False:' or 'if not cond:' 19 | # E721 do not compare types, use 'isinstance()' 20 | 21 | ignore = E122,E123,E126,E128,E211,E501,E711,E712,E721 22 | -------------------------------------------------------------------------------- /master/buildbot/process/base.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | from buildbot.process.build import Build 17 | _hush_pyflakes = [Build] 18 | -------------------------------------------------------------------------------- /master/buildbot/buildrequest.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | from buildbot.process.buildrequest import BuildRequest 17 | _hush_pyflakes = [BuildRequest] 18 | -------------------------------------------------------------------------------- /master/buildbot/status/web/templates/testresult.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | 3 | {% block content %} 4 | 5 |

6 | Builder {{ b.getBuilder().getName() }} 7 | build #{{ b.getNumber() }} 8 | test {{ '.'.join(tr.getName()) }} 9 |

10 | 11 |
12 | 13 |

Result

14 |

15 | {{ result_word }} 16 | {%- set text = tr.getText() -%} 17 | {%- if text is string %}{{ text|e }} 18 | {%- else %}{{ text|join(" ")|e }}{% endif -%} 19 |

20 | 21 |

Logs

22 |
    23 | {% for l in logs %} 24 |

    Log: {{ l.name|e }}

    25 |
    {{ l.log|e }}
    26 |
    27 | {% else %} 28 |
  • - No logs -
  • 29 | {% endfor %} 30 |
31 | 32 |
33 | 34 | {% endblock %} 35 | -------------------------------------------------------------------------------- /master/contrib/trac/README.md: -------------------------------------------------------------------------------- 1 | # What Is It? 2 | BuildBot Watcher is a [Trac](http://trac.edgewall.org) plugin. It watches a 3 | BuildBot status webserver and incorporates build information into the 4 | standard Trac timeline. 5 | 6 | # Prereqs 7 | ## For the Trac site 8 | This plugin does not require anything other than Trac 0.11+. It makes use 9 | of the standard Trac CSS classes, so it will theme appropriately. 10 | 11 | ## For the BuildMaster 12 | For now, you'll need to run a BuildBot using my patched XML-RPC server. 13 | 14 | git clone git://github.com/djmitche/buildbot.git buildbot 15 | cd buildbot 16 | git pull git://github.com/rbosetti/buildbot.git 17 | 18 | # Installation 19 | Follow the standard fetch, cook, copy procedure: 20 | 21 | git clone git://github.com/rbosetti/buildbot.git buildbot 22 | cd buildbot 23 | python setup.py bdist_egg 24 | cp dist/*.egg /path/to/trac/env/plugins 25 | -------------------------------------------------------------------------------- /master/buildbot/errors.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | # Having them here prevents all kind of circular dependencies 17 | 18 | 19 | class PluginDBError(Exception): 20 | pass 21 | -------------------------------------------------------------------------------- /master/docs/developer/cls-iproperties.rst: -------------------------------------------------------------------------------- 1 | .. index:: single: Properties; IProperties 2 | 3 | IProperties 4 | =========== 5 | 6 | .. class:: buildbot.interfaces.IProperties:: 7 | 8 | Providers of this interface allow get and set access to a build's properties. 9 | 10 | .. method:: getProperty(propname, default=None) 11 | 12 | Get a named property, returning the default value if the property is not found. 13 | 14 | .. method:: hasProperty(propname) 15 | 16 | Determine whether the named property exists. 17 | 18 | .. method:: setProperty(propname, value, source) 19 | 20 | Set a property's value, also specifying the source for this value. 21 | 22 | .. method:: getProperties() 23 | 24 | Get a :class:`buildbot.process.properties.Properties` instance. The 25 | interface of this class is not finalized; where possible, use the other 26 | ``IProperties`` methods. 27 | -------------------------------------------------------------------------------- /master/docs/manual/configuration.rst: -------------------------------------------------------------------------------- 1 | .. _Configuration: 2 | 3 | Configuration 4 | ============= 5 | 6 | The following sections describe the configuration of the various Buildbot components. 7 | The information available here is sufficient to create basic build and test configurations, and does not assume great familiarity with Python. 8 | 9 | In more advanced Buildbot configurations, Buildbot acts as a framework for a continuous-integration application. 10 | The next section, :doc:`customization`, describes this approach, with frequent references into the :ref:`development documentation `. 11 | 12 | .. toctree:: 13 | :maxdepth: 2 14 | 15 | cfg-intro 16 | cfg-global 17 | cfg-changesources 18 | cfg-schedulers 19 | cfg-buildslaves 20 | cfg-builders 21 | cfg-buildfactories 22 | cfg-properties 23 | cfg-buildsteps 24 | cfg-interlocks 25 | cfg-statustargets 26 | -------------------------------------------------------------------------------- /master/buildbot/steps/package/__init__.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Portions Copyright Buildbot Team Members 15 | # Portions Copyright Steve 'Ashcrow' Milner 16 | """ 17 | Steps specific to package formats. 18 | """ 19 | -------------------------------------------------------------------------------- /master/buildbot/scripts/trycmd.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | 17 | def trycmd(config): 18 | from buildbot.clients import tryclient 19 | t = tryclient.Try(config) 20 | t.run() 21 | return 0 22 | -------------------------------------------------------------------------------- /master/contrib/trac/bbwatcher/model.py: -------------------------------------------------------------------------------- 1 | from datetime import datetime 2 | from trac.util.datefmt import utc 3 | 4 | 5 | class Builder(object): 6 | 7 | def __init__(self, name, builds, slaves): 8 | self.name = name 9 | self.current = builds[0] 10 | self.recent = builds 11 | self.slaves = slaves 12 | 13 | 14 | class Build(object): 15 | 16 | def __init__(self, build_results): 17 | for attr in ('builder_name', 'reason', 'slavename', 'results', 18 | 'text', 'start', 'end', 'steps', 'branch', 'revision', 'number'): 19 | setattr(self, attr, build_results.get(attr, 'UNDEFINED')) 20 | try: 21 | self.start = datetime.fromtimestamp(self.start, utc) 22 | self.end = datetime.fromtimestamp(self.end, utc) 23 | except Exception: 24 | pass 25 | 26 | def __str__(self): 27 | return 'Slave <%s>' % (self.slave) 28 | -------------------------------------------------------------------------------- /master/buildbot/schedulers/filter.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | # old (pre-0.8.4) location for ChangeFilter 17 | from buildbot.changes.filter import ChangeFilter 18 | _hush_pyflakes = ChangeFilter # keep pyflakes happy 19 | -------------------------------------------------------------------------------- /master/contrib/trac/bbwatcher/templates/bbw_welcome.html: -------------------------------------------------------------------------------- 1 | 4 | 7 | 8 | 9 | 10 | $title 11 | 12 | 13 | 14 | 15 |
16 |

BuildBot Watcher

17 |

This Trac instance is watching the BuildBot server at

${url}
.

18 |

For now, you can obtain information about:

19 | 22 |
23 | 24 | 25 | -------------------------------------------------------------------------------- /master/buildbot/scripts/debugclient.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | 17 | def debugclient(config): 18 | from buildbot.clients import debug 19 | 20 | d = debug.DebugWidget(config['master'], config['passwd']) 21 | d.run() 22 | return 0 23 | -------------------------------------------------------------------------------- /common/coveragerc: -------------------------------------------------------------------------------- 1 | [report] 2 | # Regexes for lines to exclude from consideration 3 | exclude_lines = 4 | # Have to re-enable the standard pragma 5 | pragma: no cover 6 | 7 | # Don't complain about missing debug-only code: 8 | def __repr__ 9 | if self\.debug 10 | 11 | # Don't complain if tests don't hit defensive assertion code: 12 | raise AssertionError 13 | raise NotImplementedError 14 | 15 | # Don't complain if non-runnable code isn't run: 16 | if 0: 17 | if __name__ == .__main__.: 18 | if runtime.platformType == 'win32' 19 | 20 | # 'pass' generally means 'this won't be called' 21 | ^ *pass *$ 22 | 23 | # conditionals on twisted versions aren't coverable 24 | if twisted.version 25 | 26 | include = 27 | master/* 28 | slave/* 29 | 30 | omit = 31 | # omit all of our tests 32 | */test/* 33 | # templates cause coverage errors 34 | */templates/* 35 | master/buildbot/scripts/buildbot_tac.tmpl 36 | -------------------------------------------------------------------------------- /master/docs/relnotes/0.4.1.txt: -------------------------------------------------------------------------------- 1 | Buildbot-0.4.1 was released 09 Dec 2003 2 | 3 | ** MaildirSources fixed 4 | 5 | Several bugs in MaildirSource made them unusable. These have been fixed (for 6 | real this time). The Twisted buildbot is using an FCMaildirSource while they 7 | fix some FreshCVS daemon problems, which provided the encouragement for 8 | getting these bugs fixed. 9 | 10 | In addition, the use of DNotify (only available under linux) was somehow 11 | broken, possibly by changes in some recent version of Python. It appears to 12 | be working again now (against both python-2.3.3c1 and python-2.2.1). 13 | 14 | ** master.cfg can use 'basedir' variable 15 | 16 | As documented in the sample configuration file (but not actually implemented 17 | until now), a variable named 'basedir' is inserted into the namespace used 18 | by master.cfg . This can be used with something like: 19 | 20 | os.path.join(basedir, "maildir") 21 | 22 | to obtain a master-basedir-relative location. 23 | 24 | -------------------------------------------------------------------------------- /master/buildbot/status/html.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | 17 | # compatibility wrapper. This is currently the preferred place for master.cfg 18 | # to import from. 19 | 20 | from buildbot.status.web.baseweb import WebStatus 21 | _hush_pyflakes = [WebStatus] 22 | -------------------------------------------------------------------------------- /common/generate_buildbot_api_documentation.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd /tmp 4 | wget http://sourceforge.net/projects/epydoc/files/epydoc/3.0.1/epydoc-3.0.1.tar.gz 5 | tar -xzf epydoc-3.0.1.tar.gz 6 | cd epydoc-3.0.1 7 | wget http://gentoo-progress.googlecode.com/svn/overlays/progress/dev-python/epydoc/files/epydoc-3.0.1-docutils-0.6.patch 8 | wget http://gentoo-progress.googlecode.com/svn/overlays/progress/dev-python/epydoc/files/epydoc-3.0.1-python-2.6.patch 9 | patch -p0 < epydoc-3.0.1-docutils-0.6.patch 10 | patch -p0 < epydoc-3.0.1-python-2.6.patch 11 | 12 | cd /tmp 13 | 14 | wget http://pypi.python.org/packages/source/b/buildbot/buildbot-0.8.7.tar.gz 15 | wget http://pypi.python.org/packages/source/b/buildbot-slave/buildbot-slave-0.8.7.tar.gz 16 | tar -xzf buildbot-0.8.7.tar.gz 17 | tar -xzf buildbot-slave-0.8.7.tar.gz 18 | 19 | git clone https://github.com/buildbot/buildbot.git 20 | cd buildbot/apidocs 21 | PYTHONPATH="/tmp/epydoc-3.0.1:/tmp/buildbot-0.8.7:/tmp/buildbot-slave-0.8.7${PYTHONPATH:+:}${PYTHONPATH}" make 22 | -------------------------------------------------------------------------------- /master/buildbot/test/unit/test_util_sautils.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | from buildbot.util import sautils 17 | from twisted.trial import unittest 18 | 19 | 20 | class SAVersion(unittest.TestCase): 21 | 22 | def test_sa_version(self): 23 | self.failUnless(sautils.sa_version() > (0, 5, 0)) 24 | -------------------------------------------------------------------------------- /master/buildbot/status/web/templates/about.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | 3 | {% block content %} 4 | 5 |

About this Buildbot

6 | 7 |
8 | 9 |

Version Information

10 |
    11 | {% set item_class=cycler('alt', '') %} 12 | 13 |
  • Buildbot: {{ buildbot }}
  • 14 |
  • Twisted: {{ twisted }}
  • 15 |
  • Jinja: {{ jinja }}
  • 16 |
  • Python: {{ python }}
  • 17 |
  • Buildmaster platform: {{ platform }}
  • 18 | 19 |
20 | 21 |

Source code

22 | 23 |

Buildbot is a free software project, released under the terms of the 24 | GNU GPL.

25 | 26 |

Please visit the Buildbot Home Page for 27 | more information, including documentation, bug reports, and source 28 | downloads.

29 | 30 |
31 | 32 | {% endblock %} 33 | -------------------------------------------------------------------------------- /master/buildbot/status/web/templates/directory.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | 3 | {% block content %} 4 | 5 |

Directory listing for {{ path }}

6 | 7 | {% set row_class = cycler('alt', '') %} 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | {% for d in directories %} 19 | 20 | 21 | 22 | 23 | 24 | 25 | {% endfor %} 26 | 27 | {% for f in files %} 28 | 29 | 30 | 31 | 32 | 33 | 34 | {% endfor %} 35 |
NameSizeTypeEncoding
{{ d.text }}{{ d.size }}{{ d.type }}{{ d.encoding }}
{{ f.text }}{{ f.size }}{{ f.type }}{{ f.encoding }}
36 | 37 | {% endblock %} 38 | -------------------------------------------------------------------------------- /master/buildbot/db/migrate/versions/006_drop_last_access.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | import sqlalchemy as sa 17 | 18 | 19 | def upgrade(migrate_engine): 20 | metadata = sa.MetaData() 21 | metadata.bind = migrate_engine 22 | 23 | table = sa.Table('last_access', metadata, autoload=True) 24 | table.drop() 25 | -------------------------------------------------------------------------------- /master/buildbot/db/migrate/versions/020_remove_change_links.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | import sqlalchemy as sa 17 | 18 | 19 | def upgrade(migrate_engine): 20 | metadata = sa.MetaData() 21 | metadata.bind = migrate_engine 22 | 23 | tbl = sa.Table('change_links', metadata, autoload=True) 24 | tbl.drop() 25 | -------------------------------------------------------------------------------- /master/buildbot/status/__init__.py: -------------------------------------------------------------------------------- 1 | import build 2 | import builder 3 | import buildrequest 4 | import buildset 5 | import buildstep 6 | import logfile 7 | import master 8 | import slave 9 | import testresult 10 | 11 | # styles.Versioned requires this, as it keys the version numbers on the fully 12 | # qualified class name; see master/buildbot/test/regressions/test_unpickling.py 13 | buildstep.BuildStepStatus.__module__ = 'buildbot.status.builder' 14 | build.BuildStatus.__module__ = 'buildbot.status.builder' 15 | 16 | # add all of these classes to builder; this is a form of late binding to allow 17 | # circular module references among the status modules 18 | builder.BuildStepStatus = buildstep.BuildStepStatus 19 | builder.BuildSetStatus = buildset.BuildSetStatus 20 | builder.TestResult = testresult.TestResult 21 | builder.LogFile = logfile.LogFile 22 | builder.HTMLLogFile = logfile.HTMLLogFile 23 | builder.SlaveStatus = slave.SlaveStatus 24 | builder.Status = master.Status 25 | builder.BuildStatus = build.BuildStatus 26 | builder.BuildRequestStatus = buildrequest.BuildRequestStatus 27 | -------------------------------------------------------------------------------- /master/docs/manual/_images/status.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Status Objects Status Plugins User Clients 4 | 5 | +------+ +---------+ +-----------+ 6 | |Status|<--------------+-->|Waterfall|<-------|Web Browser| 7 | +------+ | +---------+ +-----------+ 8 | | +-----+ | 9 | v v | 10 | +-------+ +-------+ | +---+ +----------+ 11 | |Builder| |Builder| +---->|IRC|<----------->IRC Server| 12 | |Status | |Status | | +---+ +----------+ 13 | +-------+ +-------+ | 14 | | +----+ | 15 | v v | +------------+ +----+ 16 | +------+ +------+ +-->|MailNotifier|---->|SMTP| 17 | |Build | |Build | +------------+ +----+ 18 | |Status| |Status| 19 | +------+ +------+ 20 | | +-----+ 21 | v v 22 | +------+ +------+ 23 | |Step | |Step | 24 | |Status| |Status| 25 | +------+ +------+ 26 | | +---+ 27 | v v 28 | +----+ +----+ 29 | |Log | |Log | 30 | |File| |File| 31 | +----+ +----+ 32 | 33 | -------------------------------------------------------------------------------- /master/buildbot/buildslave/__init__.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | from buildbot.buildslave.base import AbstractBuildSlave 17 | from buildbot.buildslave.base import AbstractLatentBuildSlave 18 | from buildbot.buildslave.base import BuildSlave 19 | 20 | _hush_pyflakes = [ 21 | AbstractBuildSlave, 22 | BuildSlave, 23 | AbstractLatentBuildSlave, 24 | ] 25 | -------------------------------------------------------------------------------- /master/buildbot/db/migrate/migrate.cfg: -------------------------------------------------------------------------------- 1 | [db_settings] 2 | # Used to identify which repository this database is versioned under. 3 | # You can use the name of your project. 4 | repository_id=Buildbot 5 | 6 | # The name of the database table used to track the schema version. 7 | # This name shouldn't already be used by your project. 8 | # If this is changed once a database is under version control, you'll need to 9 | # change the table name in each database too. 10 | version_table=migrate_version 11 | 12 | # When committing a change script, Migrate will attempt to generate the 13 | # sql for all supported databases; normally, if one of them fails - probably 14 | # because you don't have that database installed - it is ignored and the 15 | # commit continues, perhaps ending successfully. 16 | # Databases in this list MUST compile successfully during a commit, or the 17 | # entire commit will fail. List the databases your application will actually 18 | # be using to ensure your updates to that database work properly. 19 | # This must be a list; example: ['postgres','sqlite'] 20 | required_dbs=[] 21 | -------------------------------------------------------------------------------- /master/contrib/css/sample1.css: -------------------------------------------------------------------------------- 1 | * { 2 | font-family: Verdana, sans-serif; 3 | font-size: 10px; 4 | font-weight: bold; 5 | } 6 | 7 | a:link,a:visited,a:active { 8 | color: #666666; 9 | } 10 | a:hover { 11 | color: #FFFFFF; 12 | } 13 | 14 | .table { 15 | border-spacing: 2px; 16 | } 17 | 18 | td.Event, td.Activity, td.Change, td.Time, td.Builder { 19 | color: #333333; 20 | border: 1px solid #666666; 21 | background-color: #CCCCCC; 22 | } 23 | 24 | /* LastBuild, BuildStep states */ 25 | .success { 26 | color: #FFFFFF; 27 | border: 1px solid #2f8f0f; 28 | background-color: #8fdf5f; 29 | } 30 | 31 | .failure { 32 | color: #FFFFFF; 33 | border: 1px solid #f33636; 34 | background-color: #e98080; 35 | } 36 | 37 | .warnings { 38 | color: #FFFFFF; 39 | border: 1px solid #fc901f; 40 | background-color: #ffc343; 41 | } 42 | 43 | .exception, td.offline { 44 | color: #FFFFFF; 45 | border: 1px solid #8000c0; 46 | background-color: #e0b0ff; 47 | } 48 | 49 | .start,.running, td.building { 50 | color: #666666; 51 | border: 1px solid #ffff00; 52 | background-color: #fffc6c; 53 | } 54 | -------------------------------------------------------------------------------- /master/contrib/os-x/README: -------------------------------------------------------------------------------- 1 | Mark Pauley contributed the two launchd plist files for OS-X (10.4+) to start 2 | a buildmaster or buildslave automatically at startup: 3 | 4 | contrib/OS-X/net.sourceforge.buildbot.master.plist 5 | contrib/OS-X/net.sourceforge.buildbot.slave.plist 6 | 7 | His email message is as follows: 8 | 9 | Message-Id: 10 | From: Mark Pauley 11 | To: buildbot-devel 12 | Date: Wed, 24 Jan 2007 11:05:44 -0800 13 | Subject: [Buildbot-devel] Sample buildbot launchd plists for MacOS 10.4+ 14 | 15 | Hi guys, 16 | I've had these kicking around for a while and thought that maybe 17 | someone would like to see them. Installing either of these two to / 18 | Library/LaunchDaemons will cause the bulidbot slave or master to auto- 19 | start as whatever user you like on launch. This is the "right way to 20 | do this" going forward, startupitems are deprecated. Please note that 21 | this means any tests that require a windowserver connection on os x 22 | won't work. 23 | 24 | -------------------------------------------------------------------------------- /slave/contrib/os-x/README: -------------------------------------------------------------------------------- 1 | Mark Pauley contributed the two launchd plist files for OS-X (10.4+) to start 2 | a buildmaster or buildslave automatically at startup: 3 | 4 | contrib/OS-X/net.sourceforge.buildbot.master.plist 5 | contrib/OS-X/net.sourceforge.buildbot.slave.plist 6 | 7 | His email message is as follows: 8 | 9 | Message-Id: 10 | From: Mark Pauley 11 | To: buildbot-devel 12 | Date: Wed, 24 Jan 2007 11:05:44 -0800 13 | Subject: [Buildbot-devel] Sample buildbot launchd plists for MacOS 10.4+ 14 | 15 | Hi guys, 16 | I've had these kicking around for a while and thought that maybe 17 | someone would like to see them. Installing either of these two to / 18 | Library/LaunchDaemons will cause the bulidbot slave or master to auto- 19 | start as whatever user you like on launch. This is the "right way to 20 | do this" going forward, startupitems are deprecated. Please note that 21 | this means any tests that require a windowserver connection on os x 22 | won't work. 23 | 24 | -------------------------------------------------------------------------------- /master/buildbot/status/web/templates/onelineperbuild.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | {% from 'build_line.html' import build_table %} 3 | {% import 'forms.html' as forms %} 4 | 5 | {% block content %} 6 |

Last {{ num_builds }} finished builds: {{ branches|join(', ')|e }}

7 | 8 | {% if builders %} 9 |

of builders: {{ builders|join(", ")|e }}

10 | {% endif %} 11 | 12 |
13 | 14 | {{ build_table(builds, True) }} 15 | 16 |
17 |
18 | 19 | {% if num_building > 0 %} 20 | {% if authz.advertiseAction('stopBuild', request) %} 21 |

Stop All Builds

22 | {{ forms.stop_build("builders/_all/stopall", authz, on_all=True, label='All Builds') }} 23 | {% endif %} 24 | {% endif %} 25 | 26 | {% if num_online > 0 %} 27 | {% if authz.advertiseAction('forceAllBuilds', request) %} 28 |

Force All Builds

29 | {{ forms.force_build("builders/_all/forceall", authz, request, True, force_schedulers=force_schedulers, default_props=default_props) }} 30 | {% endif %} 31 | {% endif %} 32 | 33 | 34 |
35 | 36 | {% endblock %} 37 | -------------------------------------------------------------------------------- /master/buildbot/test/util/properties.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | from buildbot.interfaces import IRenderable 17 | from zope.interface import implements 18 | 19 | 20 | class ConstantRenderable(object): 21 | implements(IRenderable) 22 | 23 | def __init__(self, value): 24 | self.value = value 25 | 26 | def getRenderingFor(self, props): 27 | return self.value 28 | -------------------------------------------------------------------------------- /slave/buildslave/test/test_extra_coverage.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | # this file imports a number of source files that are not 17 | # included in the coverage because none of the tests import 18 | # them; this results in a more accurate total coverage percent. 19 | 20 | modules = [] # for the benefit of pyflakes 21 | 22 | from buildslave.scripts import logwatcher 23 | modules.extend([logwatcher]) 24 | -------------------------------------------------------------------------------- /master/buildbot/test/util/flaky.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | import os 17 | envVar = 'RUN_FLAKY_TESTS' 18 | 19 | 20 | def flaky(bugNumber): 21 | def wrap(fn): 22 | if not os.environ.get(envVar): 23 | fn.skip = ("Flaky test (http://trac.buildbot.net/ticket/%d) " 24 | "- set $%s to run anyway" % (bugNumber, envVar)) 25 | return fn 26 | return wrap 27 | -------------------------------------------------------------------------------- /master/contrib/trac/bbwatcher/api.py: -------------------------------------------------------------------------------- 1 | import urlparse 2 | import xmlrpclib 3 | 4 | from model import Build 5 | from model import Builder 6 | 7 | 8 | class BuildBotSystem(object): 9 | 10 | def __init__(self, url): 11 | try: 12 | scheme, loc, _, _, _ = urlparse.urlsplit(url, scheme='http') 13 | url = '%s://%s/xmlrpc' % (scheme, loc) 14 | self.server = xmlrpclib.ServerProxy(url) 15 | except Exception, e: 16 | raise ValueError('Invalid BuildBot XML-RPC server %s: %s' % (url, e)) 17 | 18 | def getAllBuildsInInterval(self, start, stop): 19 | return self.server.getAllBuildsInInterval(start, stop) 20 | 21 | def getBuilder(self, name): 22 | builds = [] 23 | for i in range(1, 5 + 1): 24 | try: 25 | builds.append(Build(self.server.getBuild(name, -i))) 26 | except Exception, e: 27 | self.env.log.debug('Cannot fetch build-info: %s' % (e)) 28 | break 29 | return Builder(name, builds, []) 30 | 31 | def getAllBuilders(self): 32 | return self.server.getAllBuilders() 33 | -------------------------------------------------------------------------------- /master/buildbot/status/web/templates/revmacros.html: -------------------------------------------------------------------------------- 1 | {# both macro pairs must have the same signature #} 2 | 3 | {% macro id_replace(rev, url) -%} 4 | 5 | {%- if rev|length > 40 %}{{ rev[:40] }}... 6 | {%- else %}{{ rev }} 7 | {%- endif -%} 8 | 9 | {%- endmacro %} 10 | 11 | {% macro shorten_replace(short, rev, url) %} 12 |
13 |
14 | {{ short }}... 15 |
16 |
17 | {{ rev }} 18 |
19 |
20 | {% endmacro %} 21 | 22 | {% macro id(rev, url) -%} 23 | 24 | {%- if rev|length > 40 %}{{ rev[:40] }}... 25 | {%- else %}{{ rev }} 26 | {%- endif -%} 27 | 28 | {%- endmacro %} 29 | 30 | {% macro shorten(short, rev, url) %} 31 |
32 |
{{ short }}...
33 |
{{ rev }}
34 |
35 | {% endmacro %} 36 | -------------------------------------------------------------------------------- /master/buildbot/test/fake/state.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | 17 | class State(object): 18 | 19 | """ 20 | A simple class you can use to keep track of state throughout 21 | a test. Just assign whatever you want to its attributes. Its 22 | constructor provides a shortcut to setting initial values for 23 | attributes 24 | """ 25 | 26 | def __init__(self, **kwargs): 27 | self.__dict__.update(kwargs) 28 | -------------------------------------------------------------------------------- /master/buildbot/test/integration/master-0-7-5-README.txt: -------------------------------------------------------------------------------- 1 | -- 0.7.5 historical master tarball -- 2 | 3 | This tarball exists to allow testing upgrades of old versions. It was created 4 | by running the master against the included master.cfg using a normal 5 | buildbot.tac. The slave was connected, and a few changes sent, including one 6 | with some funny characters in it: 7 | 8 | $ snowman=`python -c 'print u"\N{SNOWMAN}".encode("utf-8")'` 9 | $ black_star=`python -c 'print u"\N{BLACK STAR}".encode("utf-8")'` 10 | $ comet=`python -c 'print u"\N{COMET}".encode("utf-8")'` 11 | $ buildbot sendchange --master=localhost:9989 -u \ 12 | "the snowman <$snowman@norpole.net>" \ 13 | --revision="${black_star}-devel" -b "$comet" \ 14 | --comments "shooting star or $comet?" \ 15 | "$black_star/funny_chars/in/a/path" "normal/path" 16 | $ buildbot sendchange --master=localhost:9989 17 | -u "dustin " --revision="1234" 18 | --comments "on-branch change" boring/path 19 | 20 | 0.7.5 did not support change properties from sendchange. 21 | 22 | Note that the master.cfg also puts a funny character in stdout (in UTF-8). 23 | -------------------------------------------------------------------------------- /slave/buildslave/exceptions.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | 17 | class AbandonChain(Exception): 18 | 19 | """A series of chained steps can raise this exception to indicate that 20 | one of the intermediate RunProcesses has failed, such that there is no 21 | point in running the remainder. 'rc' should be the non-zero exit code of 22 | the failing ShellCommand.""" 23 | 24 | def __repr__(self): 25 | return "" % self.args[0] 26 | -------------------------------------------------------------------------------- /master/docs/manual/_images/slaves.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | Repository| | BuildMaster | | 4 | (CVS/SVN)| | ^|^^^ | 5 | | | / c \ | 6 | ----------+ +------------------/--o----\-+ 7 | ^ / m ^ \ 8 | | / m | \ 9 | checkout/update --+ a | +-- 10 | | TCP| n | |TCP 11 | | | d | | 12 | | | s | | 13 | | | | | | 14 | | | | r | 15 | | | | e | 16 | -N-A-T-|- - - - -N-A-T- - - - -|- |- s-|- - - - -N-A-T- - - 17 | | | | u | 18 | | | | l | 19 | | +------------------|--|--t-|-+ 20 | | | | | s | | 21 | +----| v | | 22 | | | | 23 | | | | 24 | | | 25 | | BuildSlave | 26 | +----------------------------+ 27 | 28 | -------------------------------------------------------------------------------- /master/buildbot/monkeypatches/testcase_patch.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | from twisted.trial import unittest 17 | 18 | 19 | def patch(): 20 | """ 21 | Patch out TestCase.patch to skip the test on version combinations where it 22 | does not work. 23 | 24 | (used for debugging only) 25 | """ 26 | 27 | def nopatch(self, *args): 28 | raise unittest.SkipTest('unittest.TestCase.patch is not available') 29 | unittest.TestCase.patch = nopatch 30 | -------------------------------------------------------------------------------- /master/buildbot/scripts/statuslog.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | # note that this cannot be run in tests for code coverage, as it requires a 17 | # different reactor than the default 18 | 19 | from buildbot.clients import text 20 | 21 | 22 | def statuslog(config): 23 | master = config.get('master') 24 | passwd = config.get('passwd') 25 | username = config.get('username') 26 | c = text.TextClient(master, username=username, passwd=passwd) 27 | c.run() 28 | return 0 29 | -------------------------------------------------------------------------------- /master/docs/manual/optimization.rst: -------------------------------------------------------------------------------- 1 | .. _Optimization: 2 | 3 | Optimization 4 | ============ 5 | 6 | If you're feeling your Buildbot is running a bit slow, here are some tricks that may help you, but use them at your own risk. 7 | 8 | Properties load speedup 9 | ----------------------- 10 | 11 | For example, if most of your build properties are strings, you can gain an approx. 12 | 30% speedup if you put this snippet of code inside your master.cfg file:: 13 | 14 | def speedup_json_loads(): 15 | import json, re 16 | 17 | original_decode = json._default_decoder.decode 18 | my_regexp = re.compile(r'^\[\"([^"]*)\",\s+\"([^"]*)\"\]$') 19 | def decode_with_re(str, *args, **kw): 20 | m = my_regexp.match(str) 21 | try: 22 | return list(m.groups()) 23 | except: 24 | return original_decode(str, *args, **kw) 25 | json._default_decoder.decode = decode_with_re 26 | 27 | speedup_json_loads() 28 | 29 | It patches json decoder so that it would first try to extract a value from JSON that is a list of two strings (which is the case for a property being a string), and would fallback to general JSON decoder on any error. 30 | -------------------------------------------------------------------------------- /master/buildbot/scripts/statusgui.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | # note that this cannot be run in tests for code coverage, as it requires a 17 | # different reactor than the default 18 | 19 | 20 | def statusgui(config): 21 | from buildbot.clients import gtkPanes 22 | 23 | master = config.get('master') 24 | passwd = config.get('passwd') 25 | username = config.get('username') 26 | c = gtkPanes.GtkClient(master, username=username, passwd=passwd) 27 | c.run() 28 | return 0 29 | -------------------------------------------------------------------------------- /master/contrib/css/sample2.css: -------------------------------------------------------------------------------- 1 | * { 2 | font-family: Verdana, sans-serif; 3 | font-size: 12px; 4 | font-weight: bold; 5 | } 6 | 7 | a:link,a:visited,a:active { 8 | color: #666666; 9 | } 10 | a:hover { 11 | color: #FFFFFF; 12 | } 13 | 14 | .table { 15 | border-spacing: 2px; 16 | } 17 | 18 | td.Event, td.Activity, td.Change, td.Time, td.Builder { 19 | color: #333333; 20 | border: 1px solid #666666; 21 | background-color: #CCCCCC; 22 | } 23 | 24 | /* LastBuild, BuildStep states */ 25 | .success { 26 | color: #FFFFFF; 27 | border: 1px solid #2f8f0f; 28 | background-color: #72ff75; 29 | } 30 | 31 | .failure { 32 | color: #FFFFFF; 33 | border: 1px solid #f33636; 34 | background-color: red; 35 | } 36 | 37 | .warnings { 38 | color: #FFFFFF; 39 | border: 1px solid #fc901f; 40 | background-color: #ffc343; 41 | } 42 | 43 | .exception, td.offline { 44 | color: #FFFFFF; 45 | border: 1px solid #8000c0; 46 | background-color: red; 47 | } 48 | 49 | .start,.running, td.building { 50 | color: #666666; 51 | border: 1px solid #ffff00; 52 | background-color: yellow; 53 | } 54 | -------------------------------------------------------------------------------- /master/contrib/zsh/_buildbot: -------------------------------------------------------------------------------- 1 | #compdef buildbot 2 | # 3 | # This is the ZSH completion file for 'buildbot' command. It calls 'buildbot' 4 | # command with the special "--_shell-completion" option which is handled 5 | # by twisted.python.usage. t.p.usage then generates zsh code on stdout to 6 | # handle the completions. 7 | # 8 | # This file is derived from twisted/python/twisted-completion.zsh from twisted 9 | # distribution. 10 | # 11 | 12 | # redirect stderr to /dev/null otherwise deprecation warnings may get puked all 13 | # over the user's terminal if completing options for a deprecated command. 14 | # Redirect stderr to a file to debug errors. 15 | local cmd output 16 | cmd=("$words[@]" --_shell-completion zsh:$CURRENT) 17 | output=$("$cmd[@]" 2>/dev/null) 18 | 19 | if [[ $output == "#compdef "* ]]; then 20 | # Looks like we got a valid completion function - so eval it to produce 21 | # the completion matches. 22 | eval $output 23 | else 24 | echo "\nCompletion error running command:" ${(qqq)cmd} 25 | echo -n "If output below is unhelpful you may need to edit this file and " 26 | echo "redirect stderr to a file." 27 | echo "Expected completion function, but instead got:" 28 | echo $output 29 | return 1 30 | fi 31 | -------------------------------------------------------------------------------- /master/buildbot/test/regressions/test_sourcestamp_revision.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | from twisted.trial import unittest 17 | 18 | from buildbot.changes.changes import Change 19 | from buildbot.sourcestamp import SourceStamp 20 | 21 | 22 | class TestSourceStampRevision(unittest.TestCase): 23 | 24 | def testNoRevision(self): 25 | c = Change(who="catlee", files=["foo"], comments="", branch="b1", revision=None) 26 | ss = SourceStamp(changes=[c]) 27 | 28 | self.assertEquals(ss.revision, None) 29 | -------------------------------------------------------------------------------- /master/buildbot/ec2buildslave.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | from twisted.python.deprecate import deprecatedModuleAttribute 17 | from twisted.python.versions import Version 18 | 19 | from buildbot.buildslave.ec2 import EC2LatentBuildSlave 20 | 21 | deprecatedModuleAttribute(Version("Buildbot", 0, 8, 8), 22 | "It has been moved to buildbot.buildslave.ec2", 23 | "buildbot.libvirtbuildslave", "EC2LatentBuildSlave") 24 | 25 | _hush_pyflakes = [ 26 | EC2LatentBuildSlave, 27 | ] 28 | -------------------------------------------------------------------------------- /slave/contrib/zsh/_buildslave: -------------------------------------------------------------------------------- 1 | #compdef buildslave 2 | # 3 | # This is the ZSH completion file for 'buildslave' command. It calls 4 | # 'buildslave' command with the special "--_shell-completion" option which is 5 | # handled by twisted.python.usage. t.p.usage then generates zsh code on stdout 6 | # to handle the completions. 7 | # 8 | # This file is derived from twisted/python/twisted-completion.zsh from twisted 9 | # distribution. 10 | # 11 | 12 | # redirect stderr to /dev/null otherwise deprecation warnings may get puked all 13 | # over the user's terminal if completing options for a deprecated command. 14 | # Redirect stderr to a file to debug errors. 15 | local cmd output 16 | cmd=("$words[@]" --_shell-completion zsh:$CURRENT) 17 | output=$("$cmd[@]" 2>/dev/null) 18 | 19 | if [[ $output == "#compdef "* ]]; then 20 | # Looks like we got a valid completion function - so eval it to produce 21 | # the completion matches. 22 | eval $output 23 | else 24 | echo "\nCompletion error running command:" ${(qqq)cmd} 25 | echo -n "If output below is unhelpful you may need to edit this file and " 26 | echo "redirect stderr to a file." 27 | echo "Expected completion function, but instead got:" 28 | echo $output 29 | return 1 30 | fi 31 | -------------------------------------------------------------------------------- /master/buildbot/monkeypatches/decorators.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | from twisted.internet import defer 17 | from twisted.python import util 18 | 19 | 20 | def patch_noargs_decorator(decorator): 21 | def new_decorator(func): 22 | wrapper = decorator(func) 23 | wrapper.func_original = func 24 | return wrapper 25 | util.mergeFunctionMetadata(decorator, new_decorator) 26 | return new_decorator 27 | 28 | 29 | def patch(): 30 | defer.inlineCallbacks = patch_noargs_decorator(defer.inlineCallbacks) 31 | -------------------------------------------------------------------------------- /master/contrib/run_maxq.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env jython 2 | 3 | import glob 4 | import sys 5 | 6 | testdir = sys.argv[1] 7 | 8 | orderfiles = glob.glob(testdir + '/*.tests') 9 | 10 | # wee. just be glad I didn't make this one gigantic nested listcomp. 11 | # anyway, this builds a once-nested list of files to test. 12 | 13 | # open! 14 | files = [open(fn) for fn in orderfiles] 15 | 16 | # create prelim list of lists of files! 17 | files = [f.readlines() for f in files] 18 | 19 | # shwack newlines and filter out empties! 20 | files = [filter(None, [fn.strip() for fn in fs]) for fs in files] 21 | 22 | # prefix with testdir 23 | files = [[testdir + '/' + fn.strip() for fn in fs] for fs in files] 24 | 25 | print "Will run these tests:", files 26 | 27 | i = 0 28 | 29 | for testlist in files: 30 | 31 | print "===========================" 32 | print "running tests from testlist", orderfiles[i] 33 | print "---------------------------" 34 | i = i + 1 35 | 36 | for test in testlist: 37 | print "running test", test 38 | 39 | try: 40 | execfile(test, globals().copy()) 41 | 42 | except: 43 | ei = sys.exc_info() 44 | print "TEST FAILURE:", ei[1] 45 | 46 | else: 47 | print "SUCCESS" 48 | -------------------------------------------------------------------------------- /master/buildbot/status/web/templates/feed_rss20.xml: -------------------------------------------------------------------------------- 1 | {% from 'feed_description.html' import item_desc %} 2 | 3 | 4 | 5 | 6 | {{ pageTitle|e }} 7 | {{ title_url }} 8 | 9 | {% if language -%} 10 | {{ language }} 11 | {% endif %} 12 | {%- if description -%} 13 | {{ description }} 14 | {% endif %} 15 | {%- if rfc822_pubdate -%} 16 | {{ rfc822_pubdate }} 17 | {% endif %} 18 | 19 | {% for b in builds -%} 20 | 21 | {{ b.pageTitle }} 22 | {{ b.link }} 23 | 24 | {{ b.log_lines|join('\n')|e }} 27 | ]]> 28 | 29 | {% if b.rfc822_pubdate -%} 30 | {{ b.rfc822_pubdate }} 31 | {{ b.guid }} 32 | {%- endif %} 33 | 34 | 35 | 36 | {% endfor %} 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /master/buildbot/status/web/templates/box_macros.html: -------------------------------------------------------------------------------- 1 | {% macro box(text=[], comment=None) -%} 2 | 3 | {%- if comment -%}{%- endif -%} 4 | 8 | 9 | {%- if text is string -%} 10 | {{ text }} 11 | {%- else -%} 12 | {{- text|join("
") -}} 13 | {%- endif -%} 14 | 15 | {% endmacro %} 16 | 17 | {# this is currently just the text part of the boxes #} 18 | 19 | {% macro build_box(reason, url, number) -%} 20 | Build {{ number }} 21 | {%- endmacro %} 22 | 23 | {% macro step_box(text, logs, urls, stepinfo) -%} 24 | {%- if text is string -%} 25 | {{ text }} 26 | {%- else -%} 27 | {{- text|join("
") -}} 28 | {%- endif -%} 29 |
30 | {%- for l in logs %} 31 | {{ l.name|e }}
32 | {%- endfor -%} 33 | 34 | {%- for u in urls %} 35 | [{{ u.name|e }}]
36 | {%- endfor -%} 37 | {%- endmacro %} 38 | -------------------------------------------------------------------------------- /master/buildbot/status/web/templates/feed_atom10.xml: -------------------------------------------------------------------------------- 1 | {% from 'feed_description.html' import item_desc %} 2 | 3 | 4 | 5 | {{ title_url }} 6 | {{ pageTitle|e }} 7 | {% if project_url -%} 8 | 9 | 10 | {% endif %} 11 | {%- if description -%} 12 | {{ description }} 13 | {% endif %} 14 | {%- if rfc3339_pubdate -%} 15 | {{ rfc3339_pubdate }} 16 | {% endif -%} 17 | 18 | BuildBot 19 | 20 | 21 | {% for b in builds -%} 22 | 23 | {{ b.pageTitle }} 24 | 25 | 26 |
27 | {{ item_desc(b, title_url, title)|indent(6) }} 28 |
{{ b.log_lines|join('\n')|e }}
29 |
30 |
31 | {% if b.rfc3339_pubdate -%} 32 | {{ b.rfc3339_pubdate }} 33 | {{ b.guid }} 34 | {% endif -%} 35 | Buildbot 36 |
37 | 38 | {% endfor -%} 39 | 40 |
41 | -------------------------------------------------------------------------------- /slave/contrib/os-x/net.sourceforge.buildbot.slave.plist: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | Label 7 | net.sourceforge.buildbot.slave 8 | 9 | 10 | UserName 11 | buildbot 12 | 13 | 14 | WorkingDirectory 15 | /Users/buildbot/Buildbot_Slave 16 | 17 | ProgramArguments 18 | 19 | /usr/bin/twistd 20 | --nodaemon 21 | --python=buildbot.tac 22 | --logfile=buildbot.log 23 | --prefix=slave 24 | 25 | 26 | KeepAlive 27 | 28 | SuccessfulExit 29 | 30 | 31 | 32 | RunAtLoad 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /master/MANIFEST.in: -------------------------------------------------------------------------------- 1 | include MANIFEST.in README CREDITS COPYING UPGRADING 2 | 3 | include docs/examples/*.cfg 4 | include docs/conf.py 5 | include docs/Makefile 6 | include docs/buildbot.1 7 | include docs/*.rst 8 | include docs/_images/* 9 | include docs/_static/* 10 | include docs/_templates/* 11 | include docs/tutorial/*.rst 12 | include docs/tutorial/_images/*.png 13 | include docs/manual/*.rst 14 | include docs/manual/_images/*.svg 15 | include docs/manual/_images/*.txt 16 | include docs/manual/_images/*.ai 17 | include docs/manual/_images/icon.blend 18 | include docs/manual/_images/Makefile 19 | include docs/bbdocs/*.py 20 | include docs/developer/* 21 | include docs/relnotes/* 22 | 23 | include buildbot/scripts/sample.cfg 24 | include buildbot/scripts/buildbot_tac.tmpl 25 | include buildbot/status/web/files/* 26 | include buildbot/status/web/templates/*.html buildbot/status/web/templates/*.xml 27 | include buildbot/clients/debug.glade 28 | include buildbot/buildbot.png 29 | 30 | include buildbot/db/migrate/README buildbot/db/migrate/migrate.cfg 31 | 32 | include contrib/* contrib/windows/* contrib/os-x/* contrib/css/* contrib/libvirt/* 33 | include contrib/trac/* contrib/trac/bbwatcher/* contrib/trac/bbwatcher/templates/* 34 | include contrib/init-scripts/* contrib/bash/* contrib/zsh/* 35 | -------------------------------------------------------------------------------- /master/docs/manual/_images/overview.txt: -------------------------------------------------------------------------------- 1 | 2 | +------------------+ +-----------+ 3 | | |---------->| Browser | 4 | | BuildMaster | +-----------+ 5 | Changes | |--------------->+--------+ 6 | +----------->| | Build Status | email | 7 | | | |------------+ +--------+ 8 | | | |-------+ | +---------------+ 9 | | +------------------+ | +---->| Status Client | 10 | +----------+ | ^ | ^ | +---------------+ 11 | | Change | | | C| | | +-----+ 12 | | Sources | | | o| | +------------>| IRC | 13 | | | | | m| |R +-----+ 14 | | CVS | v | m| |e 15 | | SVN | +---------+ a| |s 16 | | Darcs | | Build | n| |u 17 | | .. etc | | Slave | d| |l 18 | | | +---------+ s| |t 19 | | | v |s 20 | +----------+ +---------+ 21 | | Build | 22 | | Slave | 23 | +---------+ 24 | -------------------------------------------------------------------------------- /master/buildbot/status/results.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | SUCCESS, WARNINGS, FAILURE, SKIPPED, EXCEPTION, RETRY = range(6) 17 | Results = ["success", "warnings", "failure", "skipped", "exception", "retry"] 18 | 19 | 20 | def worst_status(a, b): 21 | # SUCCESS > WARNINGS > FAILURE > EXCEPTION > RETRY 22 | # Retry needs to be considered the worst so that conusmers don't have to 23 | # worry about other failures undermining the RETRY. 24 | for s in (RETRY, EXCEPTION, FAILURE, WARNINGS, SKIPPED, SUCCESS): 25 | if s in (a, b): 26 | return s 27 | -------------------------------------------------------------------------------- /master/buildbot/scripts/restart.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | from __future__ import with_statement 17 | 18 | from buildbot.scripts import base 19 | from buildbot.scripts import start 20 | from buildbot.scripts import stop 21 | 22 | 23 | def restart(config): 24 | basedir = config['basedir'] 25 | quiet = config['quiet'] 26 | 27 | if not base.isBuildmasterDir(basedir): 28 | return 1 29 | 30 | if stop.stop(config, wait=True) != 0: 31 | return 1 32 | if not quiet: 33 | print "now restarting buildbot process.." 34 | return start.start(config) 35 | -------------------------------------------------------------------------------- /master/buildbot/test/fake/change.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | from buildbot.process.properties import Properties 17 | from buildbot.test.fake.state import State 18 | 19 | 20 | class Change(State): 21 | 22 | project = '' 23 | repository = '' 24 | branch = '' 25 | category = '' 26 | codebase = '' 27 | properties = {} 28 | 29 | def __init__(self, **kw): 30 | State.__init__(self, **kw) 31 | # change.properties is a IProperties 32 | props = Properties() 33 | props.update(self.properties, "test") 34 | self.properties = props 35 | -------------------------------------------------------------------------------- /master/buildbot/steps/package/rpm/__init__.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Portions Copyright Buildbot Team Members 15 | # Portions Copyright Steve 'Ashcrow' Milner 16 | """ 17 | Steps specific to the rpm format. 18 | """ 19 | 20 | from buildbot.steps.package.rpm.mock import MockBuildSRPM 21 | from buildbot.steps.package.rpm.mock import MockRebuild 22 | from buildbot.steps.package.rpm.rpmbuild import RpmBuild 23 | from buildbot.steps.package.rpm.rpmlint import RpmLint 24 | from buildbot.steps.package.rpm.rpmspec import RpmSpec 25 | 26 | __all__ = ['RpmBuild', 'RpmSpec', 'RpmLint', 'MockBuildSRPM', 'MockRebuild'] 27 | -------------------------------------------------------------------------------- /master/buildbot/test/__init__.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | # apply the same patches the buildmaster does when it starts 17 | from buildbot import monkeypatches 18 | monkeypatches.patch_all(for_tests=True) 19 | 20 | # enable deprecation warnings 21 | import warnings 22 | warnings.filterwarnings('always', category=DeprecationWarning) 23 | 24 | # import mock so we bail out early if it's not installed 25 | try: 26 | import mock 27 | mock = mock 28 | except ImportError: 29 | raise ImportError("Buildbot tests require the 'mock' module; " 30 | "try 'pip install mock'") 31 | -------------------------------------------------------------------------------- /master/buildbot/monkeypatches/sqlalchemy2364.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | 17 | def patch(): 18 | # a fix for http://www.sqlalchemy.org/trac/ticket/2364 19 | from sqlalchemy.dialects.sqlite.base import SQLiteDialect 20 | old_get_foreign_keys = SQLiteDialect.get_foreign_keys 21 | 22 | def get_foreign_keys_wrapper(*args, **kwargs): 23 | fkeys = old_get_foreign_keys(*args, **kwargs) 24 | # foreign keys don't have names 25 | for fkey in fkeys: 26 | fkey['name'] = None 27 | return fkeys 28 | SQLiteDialect.get_foreign_keys = get_foreign_keys_wrapper 29 | -------------------------------------------------------------------------------- /master/buildbot/status/event.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | from buildbot import interfaces 17 | from buildbot import util 18 | from zope.interface import implements 19 | 20 | 21 | class Event: 22 | implements(interfaces.IStatusEvent) 23 | 24 | started = None 25 | finished = None 26 | text = [] 27 | 28 | # IStatusEvent methods 29 | def getTimes(self): 30 | return (self.started, self.finished) 31 | 32 | def getText(self): 33 | return self.text 34 | 35 | def getLogs(self): 36 | return [] 37 | 38 | def finish(self): 39 | self.finished = util.now() 40 | -------------------------------------------------------------------------------- /master/buildbot/db/migrate/versions/014_add_users_userpass_columns.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | import sqlalchemy as sa 17 | 18 | 19 | def upgrade(migrate_engine): 20 | 21 | metadata = sa.MetaData() 22 | metadata.bind = migrate_engine 23 | 24 | users_table = sa.Table('users', metadata, autoload=True) 25 | 26 | username = sa.Column('bb_username', sa.String(128)) 27 | username.create(users_table) 28 | password = sa.Column('bb_password', sa.String(128)) 29 | password.create(users_table) 30 | 31 | idx = sa.Index('users_bb_user', users_table.c.bb_username, unique=True) 32 | idx.create() 33 | -------------------------------------------------------------------------------- /master/buildbot/test/unit/test_scripts_trycmd.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | import mock 17 | 18 | from buildbot.clients import tryclient 19 | from buildbot.scripts import trycmd 20 | from twisted.trial import unittest 21 | 22 | 23 | class TestStatusLog(unittest.TestCase): 24 | 25 | def test_trycmd(self): 26 | Try = mock.Mock() 27 | self.patch(tryclient, 'Try', Try) 28 | inst = Try.return_value = mock.Mock(name='Try-instance') 29 | 30 | rc = trycmd.trycmd(dict(cfg=1)) 31 | 32 | Try.assert_called_with(dict(cfg=1)) 33 | inst.run.assert_called_with() 34 | self.assertEqual(rc, 0) 35 | -------------------------------------------------------------------------------- /master/buildbot/monkeypatches/python14653.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | import calendar 17 | import time 18 | 19 | 20 | def fixed_mktime_tz(data): 21 | if data[9] is None: 22 | # No zone info, so localtime is better assumption than GMT 23 | return time.mktime(data[:8] + (-1,)) 24 | else: 25 | t = calendar.timegm(data) 26 | return t - data[9] 27 | 28 | 29 | def patch(): 30 | # Fix for http://bugs.python.org/issue14653 for Python 2.7.3 and below. 31 | # Required to fix http://trac.buildbot.net/ticket/2522 issue 32 | 33 | import email.utils 34 | email.utils.mktime_tz = fixed_mktime_tz 35 | -------------------------------------------------------------------------------- /master/buildbot/scheduler.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | from buildbot.schedulers.basic import AnyBranchScheduler 17 | from buildbot.schedulers.basic import Scheduler 18 | from buildbot.schedulers.dependent import Dependent 19 | from buildbot.schedulers.timed import Nightly 20 | from buildbot.schedulers.timed import Periodic 21 | from buildbot.schedulers.triggerable import Triggerable 22 | from buildbot.schedulers.trysched import Try_Jobdir 23 | from buildbot.schedulers.trysched import Try_Userpass 24 | 25 | _hush_pyflakes = [Scheduler, AnyBranchScheduler, Dependent, 26 | Periodic, Nightly, Triggerable, Try_Jobdir, Try_Userpass] 27 | del _hush_pyflakes 28 | -------------------------------------------------------------------------------- /master/buildbot/db/sourcestampsets.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | from buildbot.db import base 17 | 18 | 19 | class SourceStampSetsConnectorComponent(base.DBConnectorComponent): 20 | # Documentation is in developer/database.rst 21 | 22 | def addSourceStampSet(self): 23 | def thd(conn): 24 | # insert the sourcestampset. sourcestampset has no attributes, but 25 | # inserting a new row results in a new setid 26 | r = conn.execute(self.db.model.sourcestampsets.insert(), dict()) 27 | sourcestampsetid = r.inserted_primary_key[0] 28 | 29 | return sourcestampsetid 30 | return self.db.pool.do(thd) 31 | -------------------------------------------------------------------------------- /master/docs/relnotes/0.4.2.txt: -------------------------------------------------------------------------------- 1 | Buildbot-0.4.2 was released 08 Jan 2004 2 | 3 | ** test suite updated 4 | 5 | The test suite has been completely moved over to Twisted's "Trial" 6 | framework, and all tests now pass. To run the test suite (consisting of 64 7 | tests, probably covering about 30% of BuildBot's logic), do this: 8 | 9 | PYTHONPATH=. trial -v buildbot.test 10 | 11 | ** Mail parsers updated 12 | 13 | Several bugs in the mail-parsing code were fixed, allowing a buildmaster to 14 | be triggered by mail sent out by a CVS repository. (The Twisted Buildbot is 15 | now using this to trigger builds, as their CVS server machine is having some 16 | difficulties with FreshCVS). The FreshCVS mail format for directory 17 | additions appears to have changed recently: the new parser should handle 18 | both old and new-style messages. 19 | 20 | A parser for Bonsai commit messages (buildbot.changes.mail.parseBonsaiMail) 21 | was contributed by Stephen Davis. Thanks Stephen! 22 | 23 | ** CVS "global options" now available 24 | 25 | The CVS build step can now accept a list of "global options" to give to the 26 | cvs command. These go before the "update"/"checkout" word, and are described 27 | fully by "cvs --help-options". Two useful ones might be "-r", which causes 28 | checked-out files to be read-only, and "-R", which assumes the repository is 29 | read-only (perhaps by not attempting to write to lock files). 30 | -------------------------------------------------------------------------------- /master/buildbot/db/types/json.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | from buildbot.util import json 17 | from sqlalchemy.types import Text 18 | from sqlalchemy.types import TypeDecorator 19 | 20 | 21 | class JsonObject(TypeDecorator): 22 | 23 | """Represents an immutable json-encoded string.""" 24 | 25 | impl = Text 26 | 27 | def process_bind_param(self, value, dialect): 28 | if value is not None: 29 | value = json.dumps(value) 30 | 31 | return value 32 | 33 | def process_result_value(self, value, dialect): 34 | if value is not None: 35 | value = json.loads(value) 36 | else: 37 | value = {} 38 | return value 39 | -------------------------------------------------------------------------------- /master/buildbot/status/testresult.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | from buildbot import interfaces 17 | from zope.interface import implements 18 | 19 | 20 | class TestResult: 21 | implements(interfaces.ITestResult) 22 | 23 | def __init__(self, name, results, text, logs): 24 | assert isinstance(name, tuple) 25 | self.name = name 26 | self.results = results 27 | self.text = text 28 | self.logs = logs 29 | 30 | def getName(self): 31 | return self.name 32 | 33 | def getResults(self): 34 | return self.results 35 | 36 | def getText(self): 37 | return self.text 38 | 39 | def getLogs(self): 40 | return self.logs 41 | -------------------------------------------------------------------------------- /slave/buildslave/scripts/restart.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | from buildslave.scripts import base 17 | from buildslave.scripts import start 18 | from buildslave.scripts import stop 19 | 20 | 21 | def restart(config): 22 | quiet = config['quiet'] 23 | basedir = config['basedir'] 24 | 25 | if not base.isBuildslaveDir(basedir): 26 | return 1 27 | 28 | try: 29 | stop.stopSlave(basedir, quiet) 30 | except stop.SlaveNotRunning: 31 | if not quiet: 32 | print "no old buildslave process found to stop" 33 | if not quiet: 34 | print "now restarting buildslave process.." 35 | 36 | return start.startSlave(basedir, quiet, config['nodaemon']) 37 | -------------------------------------------------------------------------------- /slave/buildslave/test/fake/remote.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | from twisted.internet import defer 17 | 18 | 19 | class FakeRemote: 20 | 21 | """ 22 | Wrap a local object to make it look like it's remote 23 | """ 24 | 25 | def __init__(self, original, method_prefix="remote_"): 26 | self.original = original 27 | self.method_prefix = method_prefix 28 | 29 | def callRemote(self, meth, *args, **kwargs): 30 | fn = getattr(self.original, self.method_prefix + meth) 31 | return defer.maybeDeferred(fn, *args, **kwargs) 32 | 33 | def notifyOnDisconnect(self, what): 34 | pass 35 | 36 | def dontNotifyOnDisconnect(self, what): 37 | pass 38 | -------------------------------------------------------------------------------- /master/buildbot/test/util/logging.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | import re 17 | 18 | from twisted.python import log 19 | 20 | 21 | class LoggingMixin(object): 22 | 23 | def setUpLogging(self): 24 | self._logEvents = [] 25 | log.addObserver(self._logEvents.append) 26 | self.addCleanup(log.removeObserver, self._logEvents.append) 27 | 28 | def assertLogged(self, regexp): 29 | r = re.compile(regexp) 30 | for event in self._logEvents: 31 | msg = log.textFromEventDict(event) 32 | if msg is not None and r.search(msg): 33 | return 34 | self.fail( 35 | "%r not matched in log output.\n%s " % (regexp, self._logEvents)) 36 | -------------------------------------------------------------------------------- /slave/buildslave/scripts/base.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | import os 17 | 18 | 19 | def isBuildslaveDir(dir): 20 | def print_error(error_message): 21 | print "%s\ninvalid buildslave directory '%s'" % (error_message, dir) 22 | 23 | buildbot_tac = os.path.join(dir, "buildbot.tac") 24 | try: 25 | contents = open(buildbot_tac).read() 26 | except IOError, exception: 27 | print_error("error reading '%s': %s" % 28 | (buildbot_tac, exception.strerror)) 29 | return False 30 | 31 | if "Application('buildslave')" not in contents: 32 | print_error("unexpected content in '%s'" % buildbot_tac) 33 | return False 34 | 35 | return True 36 | -------------------------------------------------------------------------------- /master/docs/developer/encodings.rst: -------------------------------------------------------------------------------- 1 | String Encodings 2 | ~~~~~~~~~~~~~~~~ 3 | 4 | Buildbot expects all strings used internally to be valid Unicode strings - not 5 | bytestrings. 6 | 7 | Note that Buildbot rarely feeds strings back into external tools in such a way 8 | that those strings must match. For example, Buildbot does not attempt to 9 | access the filenames specified in a Change. So it is more important to store 10 | strings in a manner that will be most useful to a human reader (e.g., in 11 | logfiles, web status, etc.) than to store them in a lossless format. 12 | 13 | Inputs 14 | ++++++ 15 | 16 | On input, strings should be decoded, if their encoding is known. Where 17 | necessary, the assumed input encoding should be configurable. In some cases, 18 | such as filenames, this encoding is not known or not well-defined (e.g., a 19 | utf-8 encoded filename in a latin-1 directory). In these cases, the input 20 | mechanisms should make a best effort at decoding, and use e.g., the 21 | ``errors='replace'`` option to fail gracefully on un-decodable characters. 22 | 23 | Outputs 24 | +++++++ 25 | 26 | At most points where Buildbot outputs a string, the target encoding is known. 27 | For example, the web status can encode to utf-8. In cases where it is not 28 | known, it should be configurable, with a safe fallback (e.g., ascii with 29 | ``errors='replace'``. For HTML/XML outputs, consider using 30 | ``errors='xmlcharrefreplace'`` instead. 31 | -------------------------------------------------------------------------------- /slave/contrib/bash/buildslave: -------------------------------------------------------------------------------- 1 | # 2 | # This file installs BASH completions for 'buildslave' command. 3 | # 4 | 5 | _buildslave() 6 | { 7 | local buildslave_subcommands=" 8 | create-slave upgrade-slave start stop restart" 9 | 10 | local cur=${COMP_WORDS[COMP_CWORD]} 11 | local subcommand= 12 | local subcommand_args= 13 | local i=1 14 | 15 | # 16 | # 'parse' the command line so far 17 | # figure out if we have subcommand specified and any arguments to it 18 | # 19 | 20 | # skip global options 21 | while [[ "${COMP_WORDS[$i]}" == -* ]]; 22 | do 23 | i=$(($i+1)) 24 | done 25 | 26 | # save subcommand 27 | subcommand=${COMP_WORDS[$i]} 28 | i=$(($i+1)) 29 | 30 | # skip subcommand options 31 | while [[ "${COMP_WORDS[$i]}" == -* ]]; 32 | do 33 | i=$(($i+1)) 34 | done 35 | 36 | # save subcommand arguments 37 | subcommand_args=${COMP_WORDS[@]:$i:${#COMP_WORDS[@]}} 38 | 39 | if [ "$cur" == "$subcommand" ]; then 40 | # suggest buildbot subcommands 41 | COMPREPLY=( $(compgen -W "$buildslave_subcommands" $cur) ) 42 | elif [ "$cur" == "$subcommand_args" ]; then 43 | # we are at first subcommand argument 44 | # all subcommands can have slave base directory as first argument 45 | # suggest directories 46 | COMPREPLY=( $(compgen -A directory $cur) ) 47 | fi 48 | } 49 | 50 | complete -F _buildslave buildslave 51 | -------------------------------------------------------------------------------- /master/buildbot/libvirtbuildslave.py: -------------------------------------------------------------------------------- 1 | 2 | # This file is part of Buildbot. Buildbot is free software: you can 3 | # redistribute it and/or modify it under the terms of the GNU General Public 4 | # License as published by the Free Software Foundation, version 2. 5 | # 6 | # This program is distributed in the hope that it will be useful, but WITHOUT 7 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 8 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 9 | # details. 10 | # 11 | # You should have received a copy of the GNU General Public License along with 12 | # this program; if not, write to the Free Software Foundation, Inc., 51 13 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 14 | # 15 | # Copyright Buildbot Team Members 16 | 17 | from twisted.python.deprecate import deprecatedModuleAttribute 18 | from twisted.python.versions import Version 19 | 20 | from buildbot.buildslave.libvirt import Connection 21 | from buildbot.buildslave.libvirt import Domain 22 | from buildbot.buildslave.libvirt import LibVirtSlave 23 | 24 | for _attr in ["LibVirtSlave", "Connection", "Domain"]: 25 | deprecatedModuleAttribute(Version("Buildbot", 0, 8, 8), 26 | "It has been moved to buildbot.buildslave.libvirt", 27 | "buildbot.libvirtbuildslave", _attr) 28 | 29 | _hush_pyflakes = [ 30 | LibVirtSlave, 31 | Domain, 32 | Connection, 33 | ] 34 | -------------------------------------------------------------------------------- /master/contrib/fix_changes_pickle_encoding.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | """%prog [options] [changes.pck] old_encoding 3 | 4 | Re-encodes changes in a pickle file to UTF-8 from the given encoding 5 | """ 6 | 7 | if __name__ == '__main__': 8 | import os 9 | from cPickle import load, dump 10 | from optparse import OptionParser 11 | 12 | parser = OptionParser(__doc__) 13 | 14 | options, args = parser.parse_args() 15 | 16 | if len(args) == 2: 17 | changes_file = args[0] 18 | old_encoding = args[1] 19 | elif len(args) == 1: 20 | changes_file = "changes.pck" 21 | old_encoding = args[0] 22 | else: 23 | parser.error("Need at least one argument") 24 | 25 | print "opening %s" % (changes_file,) 26 | try: 27 | fp = open(changes_file) 28 | except IOError, e: 29 | parser.error("Couldn't open %s: %s" % (changes_file, str(e))) 30 | 31 | changemgr = load(fp) 32 | fp.close() 33 | 34 | print "decoding bytestrings in %s using %s" % (changes_file, old_encoding) 35 | changemgr.recode_changes(old_encoding) 36 | 37 | changes_backup = changes_file + ".old" 38 | i = 0 39 | while os.path.exists(changes_backup): 40 | i += 1 41 | changes_backup = changes_file + ".old.%i" % i 42 | print "backing up %s to %s" % (changes_file, changes_backup) 43 | os.rename(changes_file, changes_backup) 44 | 45 | dump(changemgr, open(changes_file, "w")) 46 | -------------------------------------------------------------------------------- /master/buildbot/test/unit/test_scripts_statuslog.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | import mock 17 | 18 | from buildbot.clients import text 19 | from buildbot.scripts import statuslog 20 | from twisted.trial import unittest 21 | 22 | 23 | class TestStatusLog(unittest.TestCase): 24 | 25 | def test_statuslog(self): 26 | TextClient = mock.Mock() 27 | self.patch(text, 'TextClient', TextClient) 28 | inst = TextClient.return_value = mock.Mock(name='TextClient-instance') 29 | 30 | rc = statuslog.statuslog(dict(master='mm', passwd='pp', username='uu')) 31 | 32 | TextClient.assert_called_with('mm', passwd='pp', username='uu') 33 | inst.run.assert_called_with() 34 | self.assertEqual(rc, 0) 35 | -------------------------------------------------------------------------------- /master/buildbot/db/migrate/versions/003_scheduler_class_name.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | import sqlalchemy as sa 17 | 18 | 19 | def upgrade(migrate_engine): 20 | metadata = sa.MetaData() 21 | metadata.bind = migrate_engine 22 | 23 | # add an empty class_name to the schedulers table 24 | schedulers = sa.Table('schedulers', metadata, autoload=True) 25 | class_name = sa.Column('class_name', sa.String(length=128), nullable=False, server_default=sa.DefaultClause('')) 26 | class_name.create(schedulers, populate_default=True) 27 | 28 | # and an index since we'll be selecting with (name= AND class=) 29 | idx = sa.Index('name_and_class', schedulers.c.name, schedulers.c.class_name) 30 | idx.create(migrate_engine) 31 | -------------------------------------------------------------------------------- /master/buildbot/test/util/fuzz.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | import os 17 | 18 | from twisted.internet import defer 19 | from twisted.internet import reactor 20 | from twisted.trial import unittest 21 | 22 | 23 | class FuzzTestCase(unittest.TestCase): 24 | 25 | # run each test case for 10s 26 | FUZZ_TIME = 10 27 | 28 | @defer.inlineCallbacks 29 | def test_fuzz(self): 30 | # note that this will loop if do_fuzz doesn't take long enough 31 | endTime = reactor.seconds() + self.FUZZ_TIME 32 | while reactor.seconds() < endTime: 33 | yield self.do_fuzz(endTime) 34 | 35 | # delete this test case entirely if fuzzing is not enabled 36 | if 'BUILDBOT_FUZZ' not in os.environ: 37 | del test_fuzz 38 | -------------------------------------------------------------------------------- /master/buildbot/db/migrate/versions/024_add_buildslaves_table.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | import sqlalchemy as sa 17 | 18 | from buildbot.db.types.json import JsonObject 19 | 20 | 21 | def upgrade(migrate_engine): 22 | 23 | metadata = sa.MetaData() 24 | metadata.bind = migrate_engine 25 | 26 | buildslaves = sa.Table("buildslaves", metadata, 27 | sa.Column("id", sa.Integer, primary_key=True), 28 | sa.Column("name", sa.String(256), nullable=False), 29 | sa.Column("info", JsonObject, nullable=False), 30 | ) 31 | buildslaves.create() 32 | 33 | idx = sa.Index('buildslaves_name', buildslaves.c.name, unique=True) 34 | idx.create() 35 | -------------------------------------------------------------------------------- /slave/buildslave/scripts/upgrade_slave.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | import os 17 | 18 | from buildslave.scripts import base 19 | 20 | 21 | def upgradeSlave(config): 22 | basedir = os.path.expanduser(config['basedir']) 23 | 24 | if not base.isBuildslaveDir(basedir): 25 | return 1 26 | 27 | buildbot_tac = open(os.path.join(basedir, "buildbot.tac")).read() 28 | new_buildbot_tac = buildbot_tac.replace( 29 | "from buildbot.slave.bot import BuildSlave", 30 | "from buildslave.bot import BuildSlave") 31 | if new_buildbot_tac != buildbot_tac: 32 | open(os.path.join(basedir, "buildbot.tac"), "w").write(new_buildbot_tac) 33 | print "buildbot.tac updated" 34 | else: 35 | print "No changes made" 36 | 37 | return 0 38 | -------------------------------------------------------------------------------- /master/buildbot/monkeypatches/servicechecks.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | 17 | def patch(): 18 | """ 19 | Patch startService and stopService so that they check the previous state 20 | first. 21 | 22 | (used for debugging only) 23 | """ 24 | from twisted.application.service import Service 25 | old_startService = Service.startService 26 | old_stopService = Service.stopService 27 | 28 | def startService(self): 29 | assert not self.running, "%r already running" % (self,) 30 | return old_startService(self) 31 | 32 | def stopService(self): 33 | assert self.running, "%r already stopped" % (self,) 34 | return old_stopService(self) 35 | Service.startService = startService 36 | Service.stopService = stopService 37 | -------------------------------------------------------------------------------- /master/buildbot/status/web/about.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | 17 | import buildbot 18 | import jinja2 19 | import sys 20 | import twisted 21 | 22 | from buildbot.status.web.base import HtmlResource 23 | 24 | 25 | class AboutBuildbot(HtmlResource): 26 | pageTitle = "About this Buildbot" 27 | 28 | def content(self, request, cxt): 29 | cxt.update(dict(buildbot=buildbot.version, 30 | twisted=twisted.__version__, 31 | jinja=jinja2.__version__, 32 | python=sys.version, 33 | platform=sys.platform)) 34 | 35 | template = request.site.buildbot_service.templates.get_template("about.html") 36 | template.autoescape = True 37 | return template.render(**cxt) 38 | -------------------------------------------------------------------------------- /master/buildbot/db/migrate/versions/008_add_scheduler_changes_index.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | import sqlalchemy as sa 17 | 18 | 19 | def upgrade(migrate_engine): 20 | metadata = sa.MetaData() 21 | metadata.bind = migrate_engine 22 | 23 | scheduler_changes = sa.Table('scheduler_changes', metadata, 24 | sa.Column('schedulerid', sa.Integer), 25 | sa.Column('changeid', sa.Integer), 26 | sa.Column('important', sa.SmallInteger), 27 | ) 28 | 29 | idx = sa.Index('scheduler_changes_unique', 30 | scheduler_changes.c.schedulerid, 31 | scheduler_changes.c.changeid, unique=True) 32 | idx.create(migrate_engine) 33 | -------------------------------------------------------------------------------- /slave/buildslave/test/util/compat.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | import sys 17 | import twisted 18 | 19 | from twisted.python import runtime 20 | from twisted.python import versions 21 | 22 | 23 | def usesFlushLoggedErrors(test): 24 | "Decorate a test method that uses flushLoggedErrors with this decorator" 25 | if (sys.version_info[:2] == (2, 7) 26 | and twisted.version <= versions.Version('twisted', 9, 0, 0)): 27 | test.skip = \ 28 | "flushLoggedErrors is broken on Python==2.7 and Twisted<=9.0.0" 29 | return test 30 | 31 | 32 | def skipUnlessPlatformIs(platform): 33 | def closure(test): 34 | if runtime.platformType != platform: 35 | test.skip = "not a %s platform" % platform 36 | return test 37 | return closure 38 | -------------------------------------------------------------------------------- /master/docs/developer/definitions.rst: -------------------------------------------------------------------------------- 1 | Definitions 2 | =========== 3 | 4 | Buildbot uses some terms and concepts that have specific meanings. 5 | 6 | Repository 7 | ---------- 8 | 9 | See :ref:`Attr-Repository`. 10 | 11 | Project 12 | ------- 13 | 14 | See :ref:`Attr-Project`. 15 | 16 | Version Control Comparison 17 | -------------------------- 18 | 19 | Buildbot supports a number of version control systems, and they don't all agree 20 | on their terms. This table should help to disambiguate them. 21 | 22 | =========== =========== =========== =================== 23 | Name Change Revision Branches 24 | =========== =========== =========== =================== 25 | CVS patch [1] timestamp unnamed 26 | Subversion revision integer directories 27 | Git commit sha1 hash named refs 28 | Mercurial changeset sha1 hash different repos 29 | or (permanently) 30 | named commits 31 | Darcs ? none [2] different repos 32 | Bazaar ? ? ? 33 | Perforce ? ? ? 34 | BitKeeper changeset ? different repos 35 | =========== =========== =========== =================== 36 | 37 | * [1] note that CVS only tracks patches to individual files. Buildbot tries to 38 | recognize coordinated changes to multiple files by correlating change times. 39 | 40 | * [2] Darcs does not have a concise way of representing a particular revision 41 | of the source. 42 | -------------------------------------------------------------------------------- /master/buildbot/scripts/buildbot_tac.tmpl: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from twisted.application import service 4 | from buildbot.master import BuildMaster 5 | 6 | {% if relocatable -%} 7 | basedir = '.' 8 | {% else -%} 9 | basedir = {{ basedir|repr }} 10 | {%- endif %} 11 | {% if not no_logrotate -%} 12 | rotateLength = {{ '%d' | format(log_size) }} 13 | maxRotatedFiles = {{ ('%d' | format(log_count)) if log_count != None else 'None' }} 14 | {%- endif %} 15 | configfile = {{ config|repr }} 16 | 17 | # Default umask for server 18 | umask = None 19 | 20 | # if this is a relocatable tac file, get the directory containing the TAC 21 | if basedir == '.': 22 | import os.path 23 | basedir = os.path.abspath(os.path.dirname(__file__)) 24 | 25 | # note: this line is matched against to check that this is a buildmaster 26 | # directory; do not edit it. 27 | application = service.Application('buildmaster') 28 | {% if not no_logrotate -%} 29 | from twisted.python.logfile import LogFile 30 | from twisted.python.log import ILogObserver, FileLogObserver 31 | logfile = LogFile.fromFullPath(os.path.join(basedir, "twistd.log"), rotateLength=rotateLength, 32 | maxRotatedFiles=maxRotatedFiles) 33 | application.setComponent(ILogObserver, FileLogObserver(logfile).emit) 34 | {%- endif %} 35 | 36 | m = BuildMaster(basedir, configfile, umask) 37 | m.setServiceParent(application) 38 | {% if not no_logrotate -%} 39 | m.log_rotation.rotateLength = rotateLength 40 | m.log_rotation.maxRotatedFiles = maxRotatedFiles 41 | {%- endif %} 42 | 43 | -------------------------------------------------------------------------------- /master/buildbot/db/migrate/versions/002_add_proj_repo.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | import sqlalchemy as sa 17 | 18 | 19 | def upgrade(migrate_engine): 20 | metadata = sa.MetaData() 21 | metadata.bind = migrate_engine 22 | 23 | # add project and repository columns to 'changes' an 'sourcestamps' 24 | def add_cols(table): 25 | repository = sa.Column('repository', sa.String(512), nullable=False, server_default=sa.DefaultClause('')) 26 | repository.create(table, populate_default=True) 27 | project = sa.Column('project', sa.String(512), nullable=False, server_default=sa.DefaultClause('')) 28 | project.create(table, populate_default=True) 29 | 30 | add_cols(sa.Table('changes', metadata, autoload=True)) 31 | add_cols(sa.Table('sourcestamps', metadata, autoload=True)) 32 | -------------------------------------------------------------------------------- /master/buildbot/db/migrate/versions/022_add_codebase.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | import sqlalchemy as sa 17 | 18 | 19 | def upgrade(migrate_engine): 20 | 21 | metadata = sa.MetaData() 22 | metadata.bind = migrate_engine 23 | 24 | sourcestamps_table = sa.Table('sourcestamps', metadata, autoload=True) 25 | changes_table = sa.Table('changes', metadata, autoload=True) 26 | 27 | # Add codebase to tables 28 | ss_codebase = sa.Column('codebase', sa.String(length=256), nullable=False, 29 | server_default=sa.DefaultClause("")) 30 | ss_codebase.create(sourcestamps_table) 31 | 32 | c_codebase = sa.Column('codebase', sa.String(length=256), nullable=False, 33 | server_default=sa.DefaultClause("")) 34 | c_codebase.create(changes_table) 35 | -------------------------------------------------------------------------------- /master/contrib/os-x/net.sourceforge.buildbot.master.plist: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | Label 7 | net.sourceforge.buildbot.slave 8 | 9 | 10 | UserName 11 | buildbot 12 | 13 | 14 | WorkingDirectory 15 | /Users/buildbot/Buildbot_Master 16 | 17 | ProgramArguments 18 | 19 | /usr/bin/twistd 20 | --nodaemon 21 | --python=buildbot.tac 22 | --logfile=buildbot.log 23 | --prefix=master 24 | 25 | 26 | 27 | QueueDirectories 28 | / 29 | 30 | KeepAlive 31 | 32 | SuccessfulExit 33 | 34 | 35 | 36 | RunAtLoad 37 | 38 | 39 | StandardErrorPath 40 | /var/log/build_master.log 41 | 42 | 43 | -------------------------------------------------------------------------------- /master/docs/relnotes/0.3.4.txt: -------------------------------------------------------------------------------- 1 | Buildbot 0.3.4 was released 28 Jul 2003 2 | 3 | ** IRC client 4 | 5 | The buildmaster can now join a set of IRC channels and respond to simple 6 | queries about builder status. 7 | 8 | ** slave information 9 | 10 | The build slaves can now report information from a set of info/* files in 11 | the slave base directory to the buildmaster. This will be used by the slave 12 | administrator to announce details about the system hosting the slave, 13 | contact information, etc. For now, info/admin should contain the name/email 14 | of the person who is responsible for the buildslave, and info/host should 15 | describe the system hosting the build slave (OS version, CPU speed, memory, 16 | etc). The contents of these files are made available through the waterfall 17 | display. 18 | 19 | ** change notification email parsers 20 | 21 | A parser for Syncmail (syncmail.sourceforge.net) was added. SourceForge 22 | provides examples of setting up syncmail to deliver CVS commit messages to 23 | mailing lists, so hopefully this will make it easier for sourceforge-hosted 24 | projects to set up a buildbot. 25 | 26 | email processors were moved into buildbot.changes.mail . FCMaildirSource was 27 | moved, and the compatibility location (buildbot.changes.freshcvsmail) will 28 | go away in the next release. 29 | 30 | ** w32 buildslave ought to work 31 | 32 | Some non-portable code was changed to make it more likely that the 33 | buildslave will run under windows. The Twisted buildbot now has a 34 | (more-or-less) working w32 buildslave. 35 | 36 | -------------------------------------------------------------------------------- /master/docs/relnotes/0.3.2.txt: -------------------------------------------------------------------------------- 1 | Buildbot 0.3.2 was released 7 May 2003 2 | 3 | ** packaging changes 4 | 5 | *** fix major packaging bug: none of the buildbot/* subdirectories were 6 | included in the 0.3.1 release. Sorry, I'm still figuring out distutils 7 | here.. 8 | 9 | ** internal changes 10 | 11 | *** use pb.Cacheable to update Events in remote status client. much cleaner. 12 | 13 | *** start to clean up BuildProcess->status.builder interface 14 | 15 | ** bug fixes 16 | 17 | *** waterfall display was missing a , causing it to be misrendered in most 18 | browsers (except the one I was testing it with, of course) 19 | 20 | *** URL without trailing slash (when served in a twisted-web distributed 21 | server, with a url like "http://twistedmatrix.com/~warner.twistd") should do 22 | redirect to URL-with-trailing-slash, otherwise internal hrefs are broken. 23 | 24 | *** remote status clients: forget RemoteReferences at shutdown, removes 25 | warnings about "persisting Ephemerals" 26 | 27 | ** Twisted buildprocess updates: 28 | 29 | *** match build process as of twisted-1.0.5 30 | **** use python2.2 everywhere now that twisted rejects python2.1 31 | **** look for test-result constants in multiple places 32 | *** move experimental 'trial --jelly' code to separate module 33 | *** add FreeBSD builder 34 | *** catch rc!=0 in HLint step 35 | *** remove RunUnitTestsRandomly, use randomly=1 parameter instead 36 | *** parameterize ['twisted.test'] default test case to make subclassing easier 37 | *** ignore internal distutils warnings in python2.3 builder 38 | 39 | -------------------------------------------------------------------------------- /master/buildbot/util/ansicodes.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | import re 17 | 18 | ANSI_RE = re.compile(r"^((\d+)(;\d+)*)?([a-zA-Z])") 19 | 20 | 21 | def parse_ansi_sgr(ansi_entry): 22 | """simple utility to extract ansi sgr (Select Graphic Rendition) codes, 23 | and ignore other codes. 24 | Invalid codes are restored 25 | """ 26 | classes = [] 27 | res = ANSI_RE.search(ansi_entry) 28 | if res: 29 | mode = res.group(4) 30 | ansi_entry = ansi_entry[len(res.group(0)):] 31 | if mode == 'm': 32 | classes = res.group(1) 33 | if classes: 34 | classes = res.group(1).split(";") 35 | else: 36 | classes = [] 37 | else: 38 | # illegal code, restore the CSI 39 | ansi_entry = "\033[" + ansi_entry 40 | return ansi_entry, classes 41 | -------------------------------------------------------------------------------- /slave/buildslave/test/unit/test_commands_registry.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | from twisted.trial import unittest 17 | 18 | from buildslave.commands import registry 19 | from buildslave.commands import shell 20 | 21 | 22 | class Registry(unittest.TestCase): 23 | 24 | def test_getFactory(self): 25 | factory = registry.getFactory('shell') 26 | self.assertEqual(factory, shell.SlaveShellCommand) 27 | 28 | def test_getFactory_KeyError(self): 29 | self.assertRaises(KeyError, lambda: registry.getFactory('nosuchcommand')) 30 | 31 | def test_getAllCommandNames(self): 32 | self.failUnless('shell' in registry.getAllCommandNames()) 33 | 34 | def test_all_commands_exist(self): 35 | # if this doesn't raise a KeyError, then we're good 36 | for n in registry.getAllCommandNames(): 37 | registry.getFactory(n) 38 | -------------------------------------------------------------------------------- /slave/README: -------------------------------------------------------------------------------- 1 | 2 | Buildbot: build/test automation 3 | http://buildbot.net 4 | Brian Warner 5 | Dustin J. Mitchell 6 | 7 | 8 | Buildbot is a continuous integration system designed to automate the 9 | build/test cycle. By automatically rebuilding and testing the tree each time 10 | something has changed, build problems are pinpointed quickly, before other 11 | developers are inconvenienced by the failure. Features 12 | 13 | * Buildbot is easy to set up, but very extensible and customizable. It 14 | supports arbitrary build processes, and is not limited to common build 15 | processes for particular languages (e.g., autotools or ant) 16 | 17 | * Buildbot supports building and testing on a variety of platforms. 18 | Developers, who do not have the facilities to test their changes everywhere 19 | before committing, will know shortly afterwards whether they have broken the 20 | build or not. 21 | 22 | * Buildbot has minimal requirements for slaves: using virtualenv, only a 23 | Python installation is required. 24 | 25 | * Slaves can be run behind a NAT firewall and communicate with the master 26 | 27 | * Buildbot has a variety of status-reporting tools to get information about 28 | builds in front of developers in a timely manner. 29 | 30 | 31 | Buildslave: 32 | 33 | This package contains only the buildslave implementation. The `buildbot` 34 | package contains the buildmaster as well as a complete set of documentation. 35 | 36 | See http://buildbot.net for more information and for an online version of the 37 | Buildbot documentation. 38 | -------------------------------------------------------------------------------- /slave/buildslave/test/fake/slavebuilder.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | import pprint 17 | 18 | 19 | class FakeSlaveBuilder: 20 | 21 | """ 22 | Simulates a SlaveBuilder, but just records the updates from sendUpdate 23 | in its updates attribute. Call show() to get a pretty-printed string 24 | showing the updates. Set debug to True to show updates as they happen. 25 | """ 26 | debug = False 27 | 28 | def __init__(self, usePTY=False, basedir="/slavebuilder/basedir"): 29 | self.updates = [] 30 | self.basedir = basedir 31 | self.usePTY = usePTY 32 | self.unicode_encoding = 'utf-8' 33 | 34 | def sendUpdate(self, data): 35 | if self.debug: 36 | print "FakeSlaveBuilder.sendUpdate", data 37 | self.updates.append(data) 38 | 39 | def show(self): 40 | return pprint.pformat(self.updates) 41 | -------------------------------------------------------------------------------- /master/buildbot/util/bbcollections.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | # this is here for compatibility 17 | from collections import defaultdict 18 | assert defaultdict 19 | 20 | 21 | class KeyedSets: 22 | 23 | def __init__(self): 24 | self.d = dict() 25 | 26 | def add(self, key, value): 27 | if key not in self.d: 28 | self.d[key] = set() 29 | self.d[key].add(value) 30 | 31 | def discard(self, key, value): 32 | if key in self.d: 33 | self.d[key].discard(value) 34 | if not self.d[key]: 35 | del self.d[key] 36 | 37 | def __contains__(self, key): 38 | return key in self.d 39 | 40 | def __getitem__(self, key): 41 | return self.d.get(key, set()) 42 | 43 | def pop(self, key): 44 | if key in self.d: 45 | return self.d.pop(key) 46 | return set() 47 | -------------------------------------------------------------------------------- /master/buildbot/test/util/querylog.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | from __future__ import absolute_import 17 | 18 | import logging 19 | 20 | from twisted.python import log 21 | 22 | # this class bridges Python's `logging` module into Twisted's log system. 23 | # SqlAlchemy query logging uses `logging`, so this provides a way to enter 24 | # queries into the Twisted log file. 25 | 26 | 27 | class PythonToTwistedHandler(logging.Handler): 28 | 29 | def emit(self, record): 30 | log.msg(record.getMessage()) 31 | 32 | 33 | def log_from_engine(engine): 34 | # add the handler *before* enabling logging, so that no "default" logger 35 | # is added automatically, but only do so once. This is important since 36 | # logging's loggers are singletons 37 | if not engine.logger.handlers: 38 | engine.logger.addHandler(PythonToTwistedHandler()) 39 | engine.echo = True 40 | -------------------------------------------------------------------------------- /master/buildbot/test/util/dirs.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | import os 17 | import shutil 18 | 19 | from twisted.internet import defer 20 | 21 | 22 | class DirsMixin(object): 23 | 24 | _dirs = None 25 | 26 | def setUpDirs(self, *dirs): 27 | """Make sure C{dirs} exist and are empty, and set them up to be deleted 28 | in tearDown.""" 29 | self._dirs = map(os.path.abspath, dirs) 30 | for dir in self._dirs: 31 | if os.path.exists(dir): 32 | shutil.rmtree(dir) 33 | os.makedirs(dir) 34 | # return a deferred to make chaining easier 35 | return defer.succeed(None) 36 | 37 | def tearDownDirs(self): 38 | for dir in self._dirs: 39 | if os.path.exists(dir): 40 | shutil.rmtree(dir) 41 | # return a deferred to make chaining easier 42 | return defer.succeed(None) 43 | -------------------------------------------------------------------------------- /master/docs/relnotes/0.6.6.txt: -------------------------------------------------------------------------------- 1 | Buildbot 0.6.6 was released 23 May 2005 2 | 3 | ** bugs fixed 4 | 5 | The 'sendchange', 'stop', and 'sighup' subcommands were broken, simple bugs 6 | that were not caught by the test suite. Sorry. 7 | 8 | The 'buildbot master' command now uses "raw" strings to create .tac files 9 | that will still function under windows (since we must put directory names 10 | that contain backslashes into that file). 11 | 12 | The keep-on-disk behavior added in 0.6.5 included the ability to upgrade old 13 | in-pickle LogFile instances. This upgrade function was not added to the 14 | HTMLLogFile class, so an exception would be raised when attempting to load or 15 | display any build with one of these logs (which are normally used only for 16 | showing build exceptions). This has been fixed. 17 | 18 | Several unnecessary imports were removed, so the Buildbot should function 19 | normally with just Twisted-2.0.0's "Core" module installed. (of course you 20 | will need TwistedWeb, TwistedWords, and/or TwistedMail if you use status 21 | targets that require them). The test suite should skip all tests that cannot 22 | be run because of missing Twisted modules. 23 | 24 | The master/slave's basedir is now prepended to sys.path before starting the 25 | daemon. This used to happen implicitly (as a result of twistd's setup 26 | preamble), but 0.6.5 internalized the invocation of twistd and did not copy 27 | this behavior. This change restores the ability to access "private.py"-style 28 | modules in the basedir from the master.cfg file with a simple "import 29 | private" statement. Thanks to Thomas Vander Stichele for the catch. 30 | -------------------------------------------------------------------------------- /master/buildbot/scripts/tryserver.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | from __future__ import with_statement 17 | 18 | import os 19 | import sys 20 | import time 21 | 22 | from hashlib import md5 23 | 24 | 25 | def tryserver(config): 26 | jobdir = os.path.expanduser(config["jobdir"]) 27 | job = sys.stdin.read() 28 | # now do a 'safecat'-style write to jobdir/tmp, then move atomically to 29 | # jobdir/new . Rather than come up with a unique name randomly, I'm just 30 | # going to MD5 the contents and prepend a timestamp. 31 | timestring = "%d" % time.time() 32 | m = md5() 33 | m.update(job) 34 | jobhash = m.hexdigest() 35 | fn = "%s-%s" % (timestring, jobhash) 36 | tmpfile = os.path.join(jobdir, "tmp", fn) 37 | newfile = os.path.join(jobdir, "new", fn) 38 | with open(tmpfile, "w") as f: 39 | f.write(job) 40 | os.rename(tmpfile, newfile) 41 | 42 | return 0 43 | -------------------------------------------------------------------------------- /master/docs/developer/results.rst: -------------------------------------------------------------------------------- 1 | .. _Build-Result-Codes: 2 | 3 | Build Result Codes 4 | ================== 5 | 6 | .. py:module:: buildbot.status.results 7 | 8 | Buildbot represents the status of a step, build, or buildset using a set of 9 | numeric constants. From Python, these constants are available in the module 10 | ``buildbot.status.results``, but the values also appear in the database and in 11 | external tools, so the values are fixed. 12 | 13 | .. py:data:: SUCCESS 14 | 15 | Value: 0; color: green; a successful run. 16 | 17 | .. py:data:: WARNINGS 18 | 19 | Value: 1; color: orange; a successful run, with some warnings. 20 | 21 | .. py:data:: FAILURE 22 | 23 | Value: 2; color: red; a failed run, due to problems in the build itself, as 24 | opposed to a Buildbot misconfiguration or bug. 25 | 26 | .. py:data:: SKIPPED 27 | 28 | Value: 3; color: white; a run that was skipped -- usually a step skipped by 29 | ``doStepIf`` (see :ref:`Buildstep-Common-Parameters`) 30 | 31 | .. py:data:: EXCEPTION 32 | 33 | Value: 4; color: purple; a run that failed due to a problem in Buildbot 34 | itself. 35 | 36 | .. py:data:: RETRY 37 | 38 | Value: 4; color: purple; a run that should be retried, usually due to a 39 | slave disconnection. 40 | 41 | .. py:data:: Results 42 | 43 | A dictionary mapping result codes to their lowercase names. 44 | 45 | .. py:function:: worst_status(a, b) 46 | 47 | This function takes two status values, and returns the "worst" status of 48 | the two. This is used (with exceptions) to aggregate step statuses into 49 | build statuses, and build statuses into buildset statuses. 50 | -------------------------------------------------------------------------------- /master/buildbot/db/migrate/versions/009_add_patch_author.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | import sqlalchemy as sa 17 | 18 | 19 | def upgrade(migrate_engine): 20 | metadata = sa.MetaData() 21 | metadata.bind = migrate_engine 22 | 23 | # add patch_author and patch_comment to the patches table 24 | 25 | # mysql doesn't like default values on these columns 26 | defaults = {} 27 | if migrate_engine.dialect.name != "mysql": 28 | defaults['server_default'] = sa.DefaultClause('') 29 | 30 | patches = sa.Table('patches', metadata, autoload=True) 31 | patch_author = sa.Column('patch_author', sa.Text, nullable=False, 32 | **defaults) 33 | patch_author.create(patches, populate_default=True) 34 | 35 | patch_author = sa.Column('patch_comment', sa.Text, nullable=False, 36 | **defaults) 37 | patch_author.create(patches, populate_default=True) 38 | -------------------------------------------------------------------------------- /master/buildbot/plugins/__init__.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | """ 17 | Buildbot plugin infrastructure 18 | """ 19 | 20 | from buildbot.plugins.db import get_plugins 21 | from buildbot.interfaces import IBuildSlave 22 | from buildbot.interfaces import IBuildStep 23 | from buildbot.interfaces import IChangeSource 24 | from buildbot.interfaces import IScheduler 25 | from buildbot.interfaces import IStatusReceiver 26 | 27 | 28 | __all__ = ['changes', 'schedulers', 'buildslave', 'steps', 'status', 'util'] 29 | 30 | 31 | # Names here match the names of the corresponding Buildbot module, hence 32 | # 'changes', 'schedulers', but 'buildslave' 33 | changes = get_plugins('changes', IChangeSource) 34 | schedulers = get_plugins('schedulers', IScheduler) 35 | buildslave = get_plugins('buildslave', IBuildSlave) 36 | steps = get_plugins('steps', IBuildStep) 37 | status = get_plugins('status', IStatusReceiver) 38 | util = get_plugins('util', None) 39 | -------------------------------------------------------------------------------- /master/buildbot/status/web/templates/grid_macros.html: -------------------------------------------------------------------------------- 1 | {% macro tag_title() -%} 2 | {% if tags %} 3 |
4 | {% trans tags=tags %} 5 | Tag:
6 | {% pluralize tags %} 7 | Tags:
8 | {% endtrans %} 9 | {% for c in tags %} 10 | {{ c|e }}
11 | {% endfor %} 12 | {% endif %} 13 | 14 | {% if branch != ANYBRANCH %} 15 |
Branch: {{ branch|e or "trunk" }} 16 | {% endif %} 17 | {%- endmacro %} 18 | 19 | 20 | {% macro stamp_td(sourcestamps) -%} 21 | 22 | {% for ss in sourcestamps %} 23 | {%- if ss.project %}{{ ss.project|e }}: {% endif %} 24 | {%- if ss.codebase %}{{ ss.codebase|e }}: {% endif %} 25 | {%- if ss.revision -%} 26 | {{ ss.revision|shortrev(ss.repository) }} 27 | {%- else %}latest{% endif %} 28 | {%- if ss.branch %} in {{ ss.branch|e }}{% endif %} 29 | {%- if ss.hasPatch %} [patch]{% endif -%} 30 |
31 | {%- endfor %} 32 | 33 | {%- endmacro %} 34 | 35 | {% macro builder_td(b) -%} 36 | 37 | {{ b.name }} 38 | {%- if b.state != 'idle' or b.n_pending > 0 -%} 39 |
({{ b.state }} 40 | {%- if b.n_pending > 0 -%} 41 | , plus {{ b.n_pending }} 42 | {%- endif -%} 43 | ) 44 | {%- endif -%} 45 | 46 | {%- endmacro %} 47 | 48 | {% macro build_td(build) -%} 49 | {% if build %} 50 | 51 | {{ build.text|join('
') }}
52 | 53 | {% else %} 54 |   55 | {% endif %} 56 | {%- endmacro %} 57 | 58 | -------------------------------------------------------------------------------- /slave/buildslave/__init__.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | # strategy: 17 | # 18 | # if there is a VERSION file, use its contents. otherwise, call git to 19 | # get a version string. if that also fails, use 'latest'. 20 | # 21 | import os 22 | 23 | version = "latest" 24 | 25 | try: 26 | fn = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'VERSION') 27 | version = open(fn).read().strip() 28 | 29 | except IOError: 30 | from subprocess import Popen, PIPE 31 | import re 32 | 33 | VERSION_MATCH = re.compile(r'\d+\.\d+\.\d+(\w|-)*') 34 | 35 | try: 36 | dir = os.path.dirname(os.path.abspath(__file__)) 37 | p = Popen(['git', 'describe', '--tags', '--always'], cwd=dir, 38 | stdout=PIPE, stderr=PIPE) 39 | out = p.communicate()[0] 40 | 41 | if (not p.returncode) and out: 42 | v = VERSION_MATCH.search(out) 43 | if v: 44 | version = v.group() 45 | except OSError: 46 | pass 47 | -------------------------------------------------------------------------------- /master/buildbot/test/fake/slave.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | import os 17 | 18 | from buildbot.process import properties 19 | from twisted.internet import defer 20 | 21 | 22 | class FakeSlave(object): 23 | slavename = 'test' 24 | 25 | def __init__(self, master): 26 | self.master = master 27 | self.properties = properties.Properties() 28 | 29 | def acquireLocks(self): 30 | pass 31 | 32 | def releaseLocks(self): 33 | pass 34 | 35 | def attached(self, bot): 36 | self.slave_system = 'posix' 37 | self.path_module = os.path 38 | self.buildslaveid = 1234 39 | self.slave_basedir = '/sl' 40 | return defer.succeed(None) 41 | 42 | def detached(self, mind): 43 | pass 44 | 45 | def addSlaveBuilder(self, sb): 46 | pass 47 | 48 | def removeSlaveBuilder(self, sb): 49 | pass 50 | 51 | def buildFinished(self, sb): 52 | pass 53 | 54 | def canStartBuild(self): 55 | pass 56 | -------------------------------------------------------------------------------- /common/gcode-upload.sh: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | usage='USAGE: gcode-upload.sh VERSION USERNAME GCODE-PASSWORD 4 | 5 | The gcode password is available from http://code.google.com/hosting/settings; 6 | it is *not* your google account password. 7 | ' 8 | 9 | if test $# != 3; then 10 | echo "$usage" 11 | exit 1 12 | fi 13 | 14 | if test ! -f common/googlecode_upload.py; then 15 | echo "download googlecode_upload.py from" 16 | echo " http://support.googlecode.com/svn/trunk/scripts/googlecode_upload.py" 17 | echo "and place it in common/" 18 | exit 1 19 | fi 20 | 21 | VERSION="$1" 22 | USERNAME="$2" 23 | PASSWORD="$3" 24 | 25 | findfile() { 26 | local file="$1" 27 | test -f "dist/$file" && echo "dist/$file" 28 | test -f "master/dist/$file" && echo "master/dist/$file" 29 | test -f "slave/dist/$file" && echo "slave/dist/$file" 30 | test -f "$file" && echo "$file" 31 | } 32 | 33 | findlabels() { 34 | local file="$1" 35 | local labels=Featured 36 | if test "`echo $file | sed 's/.*\.asc/Signature/'`" = "Signature"; then 37 | labels="$labels,Signature" 38 | fi 39 | if test "`echo $file | sed 's/.*\.tar.gz.*/Tar/'`" = "Tar"; then 40 | labels="$labels,OpSys-POSIX" 41 | else 42 | labels="$labels,OpSys-Win" 43 | fi 44 | echo $labels 45 | } 46 | 47 | for file in {buildbot,buildbot-slave}-$VERSION.{tar.gz,zip}{,.asc}; do 48 | labels=`findlabels "$file"` 49 | file=`findfile "$file"` 50 | echo "Uploading $file with labels $labels" 51 | python common/googlecode_upload.py \ 52 | -w $PASSWORD \ 53 | -u $USERNAME \ 54 | -p buildbot \ 55 | -s `basename $file` \ 56 | --labels=$labels \ 57 | "$file" 58 | done 59 | -------------------------------------------------------------------------------- /master/buildbot/test/unit/test_util_ansicodes.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | from buildbot.util.ansicodes import parse_ansi_sgr 17 | from twisted.trial import unittest 18 | 19 | 20 | class TestAnsiCodes(unittest.TestCase): 21 | 22 | def runTest(self, string, expected): 23 | ret = parse_ansi_sgr(string) 24 | self.assertEqual(ret, expected) 25 | 26 | def test_ansi0m(self): 27 | self.runTest("mfoo", ("foo", [])) 28 | 29 | def test_ansi1m(self): 30 | self.runTest("33mfoo", ("foo", ["33"])) 31 | 32 | def test_ansi2m(self): 33 | self.runTest("1;33mfoo", ("foo", ["1", "33"])) 34 | 35 | def test_ansi5m(self): 36 | self.runTest("1;2;3;4;33mfoo", ("foo", ["1", "2", "3", "4", "33"])) 37 | 38 | def test_ansi_notm(self): 39 | self.runTest("33xfoo", ("foo", [])) 40 | 41 | def test_ansi_invalid(self): 42 | self.runTest("<>foo", ("\033[<>foo", [])) 43 | 44 | def test_ansi_invalid_start_by_semicolon(self): 45 | self.runTest(";3m", ("\033[;3m", [])) 46 | -------------------------------------------------------------------------------- /master/docs/index.rst: -------------------------------------------------------------------------------- 1 | .. ================================== 2 | BuildBot Documentation - |version| 3 | ================================== 4 | 5 | This is the Buildbot documentation for Buildbot version |version|. 6 | 7 | If you are evaluating Buildbot and would like to get started quickly, start with the :doc:`Tutorial `. 8 | Regular users of Buildbot should consult the :doc:`Manual `, and those wishing to modify Buildbot directly will want to be familiar with the :doc:`Developer's Documentation `. 9 | 10 | Table Of Contents 11 | ----------------- 12 | 13 | .. toctree:: 14 | :maxdepth: 2 15 | 16 | tutorial/index 17 | manual/index 18 | developer/index 19 | relnotes/index 20 | 21 | Indices and Tables 22 | ================== 23 | 24 | * :ref:`genindex` 25 | * :bb:index:`cfg` 26 | * :bb:index:`sched` 27 | * :bb:index:`chsrc` 28 | * :bb:index:`step` 29 | * :bb:index:`status` 30 | * :bb:index:`cmdline` 31 | * :ref:`modindex` 32 | * :ref:`search` 33 | 34 | Copyright 35 | ========= 36 | 37 | This documentation is part of Buildbot. 38 | 39 | Buildbot is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. 40 | 41 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 42 | See the GNU General Public License for more details. 43 | 44 | You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 45 | 46 | Copyright Buildbot Team Members 47 | -------------------------------------------------------------------------------- /master/buildbot/db/migrate/versions/016_restore_buildrequest_indices.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | import sqlalchemy as sa 17 | 18 | 19 | def upgrade(migrate_engine): 20 | metadata = sa.MetaData() 21 | metadata.bind = migrate_engine 22 | 23 | # the column drops in 011_add_buildrequest_claims.py unfortunately 24 | # also drop a great deal of other stuff on sqlite. In particular, all 25 | # indexes and foreign keys. 26 | # 27 | # The foreign keys do not matter anyway - SQLite tracks them but ignores 28 | # them. The indices, however, are important, so they are re-added here, 29 | # but only for the sqlite dialect. 30 | 31 | if migrate_engine.dialect.name != 'sqlite': 32 | return 33 | 34 | buildrequests = sa.Table('buildrequests', metadata, autoload=True) 35 | sa.Index('buildrequests_buildsetid', buildrequests.c.buildsetid).create() 36 | sa.Index('buildrequests_buildername', buildrequests.c.buildername).create() 37 | sa.Index('buildrequests_complete', buildrequests.c.complete).create() 38 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Contributing to Buildbot 2 | ======================== 3 | 4 | Thank you for contributing to Buildbot! 5 | 6 | What appears below is just a quick summary. See http://trac.buildbot.net/wiki/Development for the full story. 7 | 8 | Issues, Bugs, Tickets 9 | --------------------- 10 | 11 | *We do not use the GitHub Issue Tracker for bugs* 12 | 13 | Please file tickets for any bugs you discover at http://trac.buildbot.net. 14 | 15 | The GitHub Issue Tracker is enabled only because it is a more usable interface for pull requests. 16 | 17 | Patches 18 | ------- 19 | 20 | Contributions to Buildbot should come as a complete package. For code changes, tests and documentation updates should be included. Consider issues of compatibility, flexibility, and simplicity. Follow the existing Buildbot coding style, and be sure that your changes do not cause warnings from pyflakes. Patches are best submitted as Github pull requests, but also accepted as patch files attached to Trac tickets, or in attachments sent to the buildbot-devel mailing list. Patch guidelines are at http://trac.buildbot.net/wiki/SubmittingPatches. 21 | 22 | Your contribution must be licensed under the GPLv2, and copyright assignment is not expected (or possible: Buildbot is not a legal entity). See http://trac.buildbot.net/wiki/LicensingYourContribution for details. 23 | 24 | You should run common/validate.sh before sending your patches. 25 | 26 | Also you can install our git hook for validating and fixing most common coding style issues 27 | 28 | cp common/hooks/post-commit .git/hooks 29 | 30 | Development Tips 31 | ---------------- 32 | 33 | The easiest way to hack on Buildbot is in a virtualenv. See http://trac.buildbot.net/wiki/RunningBuildbotWithVirtualEnv for a description of how to set up such a thing. 34 | -------------------------------------------------------------------------------- /master/buildbot/__init__.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | from __future__ import with_statement 17 | 18 | # strategy: 19 | # 20 | # if there is a VERSION file, use its contents. otherwise, call git to 21 | # get a version string. if that also fails, use 'latest'. 22 | # 23 | import os 24 | 25 | version = "latest" 26 | 27 | try: 28 | fn = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'VERSION') 29 | with open(fn) as f: 30 | version = f.read().strip() 31 | 32 | except IOError: 33 | from subprocess import Popen, PIPE 34 | import re 35 | 36 | VERSION_MATCH = re.compile(r'\d+\.\d+\.\d+(\w|-)*') 37 | 38 | try: 39 | dir = os.path.dirname(os.path.abspath(__file__)) 40 | p = Popen(['git', 'describe', '--tags', '--always'], cwd=dir, 41 | stdout=PIPE, stderr=PIPE) 42 | out = p.communicate()[0] 43 | 44 | if (not p.returncode) and out: 45 | v = VERSION_MATCH.search(out) 46 | if v: 47 | version = v.group() 48 | except OSError: 49 | pass 50 | -------------------------------------------------------------------------------- /master/buildbot/steps/source/gerrit.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | from buildbot.steps.source.git import Git 17 | 18 | 19 | class Gerrit(Git): 20 | 21 | def __init__(self, **kwargs): 22 | Git.__init__(self, **kwargs) 23 | 24 | def startVC(self, branch, revision, patch): 25 | gerrit_branch = None 26 | if self.build.hasProperty("event.patchSet.ref"): 27 | gerrit_branch = self.build.getProperty("event.patchSet.ref") 28 | self.updateSourceProperty("gerrit_branch", gerrit_branch) 29 | else: 30 | try: 31 | change = self.build.getProperty("gerrit_change", '').split('/') 32 | if len(change) == 2: 33 | gerrit_branch = "refs/changes/%2.2d/%d/%d" \ 34 | % (int(change[0]) % 100, int(change[0]), int(change[1])) 35 | self.updateSourceProperty("gerrit_branch", gerrit_branch) 36 | except: 37 | pass 38 | 39 | branch = gerrit_branch or branch 40 | super(Gerrit, self).startVC(branch, revision, patch) 41 | -------------------------------------------------------------------------------- /master/buildbot/status/web/templates/buildslaves.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | 3 | {% block content %} 4 | 5 |

Buildslaves

6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | {%- if show_builder_column %} 14 | 15 | {%- endif %} 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | {% for s in slaves %} 24 | 25 | 26 | 27 | {%- if show_builder_column %} 28 | 37 | {%- endif %} 38 | 39 | 40 | 41 | 42 | {%- if s.admin -%} 43 | 44 | {%- else -%} 45 | 46 | {%- endif -%} 47 | 48 | 53 | 56 | 57 | {% if s.connected %} 58 | {% if s.running_builds %} 59 | 60 | {% elif s.paused %} 61 | 62 | {% else %} 63 | 64 | {% endif %} 65 | 66 | {% else %} 67 | 68 | {% endif %} 69 | 70 | 71 | {% endfor %} 72 |
NameBuildersBuildBotAdminLast heard fromConnects/HourStatus
{{ s.name }} 29 | {%- if s.builders %} 30 | {%- for b in s.builders %} 31 | {{ b.name }} 32 | {%- endfor %} 33 | {%- else %} 34 | no builders 35 | {%- endif -%} 36 | {{ (s.version or '-')|e }}{{ s.admin|email }}- 49 | {%- if s.last_heard_from_age -%} 50 | {{ s.last_heard_from_age }} ({{ s.last_heard_from_time }}) 51 | {%- endif -%} 52 | 54 | {{ s.connectCount }} 55 | Running {{ s.running_builds }} build(s)PausedIdleNot connected
73 | 74 |
75 | 76 | {% endblock %} 77 | -------------------------------------------------------------------------------- /master/buildbot/test/util/config.py: -------------------------------------------------------------------------------- 1 | # This file is part of Buildbot. Buildbot is free software: you can 2 | # redistribute it and/or modify it under the terms of the GNU General Public 3 | # License as published by the Free Software Foundation, version 2. 4 | # 5 | # This program is distributed in the hope that it will be useful, but WITHOUT 6 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 7 | # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 8 | # details. 9 | # 10 | # You should have received a copy of the GNU General Public License along with 11 | # this program; if not, write to the Free Software Foundation, Inc., 51 12 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 13 | # 14 | # Copyright Buildbot Team Members 15 | 16 | from buildbot import config 17 | 18 | 19 | class ConfigErrorsMixin(object): 20 | 21 | def assertConfigError(self, errors, substr_or_re): 22 | if len(errors.errors) > 1: 23 | self.fail("too many errors: %s" % (errors.errors,)) 24 | elif len(errors.errors) < 1: 25 | self.fail("expected error did not occur") 26 | elif isinstance(substr_or_re, str): 27 | if substr_or_re not in errors.errors[0]: 28 | self.fail("non-matching error: %s" % (errors.errors,)) 29 | else: 30 | if not substr_or_re.search(errors.errors[0]): 31 | self.fail("non-matching error: %s" % (errors.errors,)) 32 | 33 | def assertRaisesConfigError(self, substr_or_re, fn): 34 | try: 35 | fn() 36 | except config.ConfigErrors, e: 37 | self.assertConfigError(e, substr_or_re) 38 | else: 39 | self.fail("ConfigErrors not raised") 40 | 41 | def assertNoConfigErrors(self, errors): 42 | self.assertEqual(errors.errors, []) 43 | --------------------------------------------------------------------------------