Buildbot Documentation Release 1.6.0
Total Page:16
File Type:pdf, Size:1020Kb
Buildbot Documentation Release 1.6.0 Brian Warner Nov 17, 2018 Contents 1 Buildbot Tutorial 3 1.1 First Run.................................................3 1.2 First Buildbot run with Docker......................................6 1.3 A Quick Tour...............................................9 1.4 Further Reading............................................. 17 2 Buildbot Manual 23 2.1 Introduction............................................... 23 2.2 Installation................................................ 29 2.3 Concepts................................................. 41 2.4 Secret Management........................................... 50 2.5 Configuration............................................... 53 2.6 Customization.............................................. 251 2.7 Command-line Tool........................................... 278 2.8 Resources................................................. 289 2.9 Optimization............................................... 289 2.10 Plugin Infrastructure in Buildbot..................................... 289 2.11 Deployment............................................... 290 2.12 Upgrading................................................ 292 3 Buildbot Development 305 3.1 Development Quick-start......................................... 305 3.2 General Documents........................................... 307 3.3 APIs................................................... 391 3.4 Python3 compatibility.......................................... 484 3.5 Classes.................................................. 487 4 Release Notes 525 4.1 Buildbot 1.5.0 ( 2018-10-09 )................................... 525 4.2 Buildbot 1.4.0 ( 2018-09-02 )................................... 526 4.3 Buildbot 1.3.0 ( 2018-07-13 )................................... 526 4.4 Buildbot 1.2.0 ( 2018-06-10 )................................... 527 4.5 Buildbot 1.1.2 ( 2018-05-15 )................................... 527 4.6 Buildbot 1.1.1 ( 2018-04-06 )................................... 528 4.7 Buildbot 1.1.0 ( 2018-03-10 )................................... 529 4.8 Buildbot 1.0.0 ( 2018-02-11 )................................... 529 4.9 Buildbot 0.9.15.post1 ( 2018-01-07 ).............................. 530 i 4.10 Buildbot 0.9.15 ( 2018-01-02 ).................................. 531 4.11 Buildbot 0.9.14 ( 2017-12-08 ).................................. 532 4.12 Buildbot 0.9.13 ( 2017-11-07 ).................................. 532 4.13 Buildbot 0.9.12.post1 ( 2017-10-10 ).............................. 533 4.14 Buildbot 0.9.12 ( 2017-10-05 ).................................. 534 4.15 Buildbot 0.9.11 ( 2017-09-08 ).................................. 534 4.16 Buildbot 0.9.10 ( 2017-08-03 ).................................. 536 4.17 Buildbot 0.9.9.post2 ( 2017-07-06 ).............................. 536 4.18 Buildbot 0.9.9.post1 ( 2017-07-01 ).............................. 537 4.19 Buildbot 0.9.9 ( 2017-06-29 )................................... 537 4.20 Buildbot 0.9.8 ( 2017-06-14 )................................... 538 4.21 Buildbot 0.9.7 ( 2017-05-09 )................................... 539 4.22 Buildbot 0.9.6 ( 2017-04-19 )................................... 539 4.23 Buildbot 0.9.5 ( 2017-03-18 )................................... 541 4.24 Buildbot 0.9.4 ( 2017-02-08 )................................... 542 4.25 Buildbot 0.9.3 ( 2017-01-11 )................................... 543 4.26 Buildbot 0.9.2 ( 2016-12-13 )................................... 544 5 Older Release Notes 545 5.1 Release Notes for Buildbot 0.9.1 ................................... 545 5.2 Release Notes for Buildbot 0.9.0 ................................... 548 5.3 Release Notes for Buildbot 0.9.0rc4 ................................. 558 5.4 Release Notes for Buildbot 0.9.0rc3 ................................. 559 5.5 Release Notes for Buildbot 0.9.0rc2 ................................. 559 5.6 Release Notes for Buildbot 0.9.0rc1 ................................. 561 5.7 Release Notes for Buildbot 0.9.0b9................................... 562 5.8 Release Notes for Buildbot 0.9.0b8................................... 564 5.9 Release Notes for Buildbot 0.9.0b7................................... 571 5.10 Release Notes for Buildbot 0.9.0b6................................... 572 5.11 Release Notes for Buildbot 0.9.0b5................................... 573 5.12 Release Notes for Buildbot 0.9.0b4................................... 573 5.13 Release Notes for Buildbot 0.9.0b3................................... 574 5.14 Release Notes for Buildbot 0.9.0b2................................... 575 5.15 Release Notes for Buildbot 0.9.0b1................................... 576 5.16 Release Notes for Buildbot 0.8.11.................................... 583 5.17 Release Notes for Buildbot 0.8.10.................................... 586 5.18 Release Notes for Buildbot 0.8.9..................................... 587 5.19 Release Notes for Buildbot v0.8.8.................................... 594 5.20 Release Notes for Buildbot v0.8.7.................................... 596 5.21 Release Notes for Buildbot v0.8.6p1................................... 600 6 Indices and Tables 605 7 Copyright 607 Buildmaster Configuration Index 609 Scheduler Index 611 Change Source Index 613 Build Step Index 615 Reporter Target Index 617 ii Configurator Target Index 619 Build Worker Index 621 Command Line Index 623 Data API Event Index 625 REST/Data API Resource Type Index 627 REST/Data API Path Index 629 REST/Data API Actions Index 631 Python Module Index 633 iii iv Buildbot Documentation, Release 1.6.0 This is the Buildbot documentation for Buildbot version 1.6.0. If you are evaluating Buildbot and would like to get started quickly, start with the Tutorial. Regular users of Buildbot should consult the Manual, and those wishing to modify Buildbot directly will want to be familiar with the Developer’s Documentation. Contents 1 Buildbot Documentation, Release 1.6.0 2 Contents CHAPTER 1 Buildbot Tutorial Contents: 1.1 First Run 1.1.1 Goal This tutorial will take you from zero to running your first buildbot master and worker as quickly as possible, without changing the default configuration. This tutorial is all about instant gratification and the five minute experience: in five minutes we want to convince you that this project works, and that you should seriously consider spending time learning the system. In this tutorial no configuration or code changes are done. This tutorial assumes that you are running Unix, but might be adaptable to Windows. Thanks to virtualenv (https://pypi.python.org/pypi/virtualenv), installing buildbot in a standalone environment is very easy. For those more familiar with Docker (https://docker.com), there also exists a docker version of these instructions. You should be able to cut and paste each shell block from this tutorial directly into a terminal. 1.1.2 Getting ready There are many ways to get the code on your machine. We will use the easiest one: via pip in a virtualenv (https://pypi.python.org/pypi/virtualenv). It has the advantage of not polluting your operating system, as everything will be contained in the virtualenv. To make this work, you will need the following installed: • Python (https://www.python.org/) and the development packages for it • virtualenv (https://pypi.python.org/pypi/virtualenv) 3 Buildbot Documentation, Release 1.6.0 Preferably, use your distribution package manager to install these. You will also need a working Internet connection, as virtualenv and pip will need to download other projects from the Internet. Note: Buildbot does not require root access. Run the commands in this tutorial as a normal, unprivileged user. 1.1.3 Creating a master The first necessary step is to create a virtualenv for our master. We will also use a separate directory to demonstrate the distinction between a master and worker: mkdir -p ~/tmp/bb-master cd ~/tmp/bb-master On Python 2: virtualenv --no-site-packages sandbox source sandbox/bin/activate On Python 3: python3 -m venv sandbox source sandbox/bin/activate Now that we are ready, we need to install buildbot: pip install --upgrade pip pip install 'buildbot[bundle]' Now that buildbot is installed, it’s time to create the master: buildbot create-master master Buildbot’s activity is controlled by a configuration file. We will use the sample configuration file unchanged: mv master/master.cfg.sample master/master.cfg Finally, start the master: buildbot start master You will now see some log information from the master in this terminal. It should end with lines like these: 2014-11-01 15:52:55+0100 [-] BuildMaster is running The buildmaster appears to have (re)started correctly. From now on, feel free to visit the web status page running on the port 8010: http://localhost:8010/ Our master now needs (at least) a worker to execute its commands. For that, head on to the next section! 1.1.4 Creating a worker The worker will be executing the commands sent by the master. In this tutorial, we are using the buildbot/hello- world project as an example. As a consequence of this, your worker will need access to the git (https://git-scm.com/) 4 Chapter 1. Buildbot Tutorial Buildbot Documentation, Release 1.6.0 command in order to checkout some code. Be sure that it is installed, or the builds will fail. Same as we did for our master, we will create a virtualenv for our worker next to the other one. It would however be completely ok to do this on another computer - as long as the worker computer is able to connect to the master one: mkdir