
Any project over the years of development has a large and complex infrastructure. A lot of build scripts, hooks and self-written utilities eventually turn into a whole bunch of problems. This is difficult to avoid completely, but it is quite possible to reduce the number of possible troubles. Today I will tell you about one tool that can help you with this.
Buildbot? No, have not heard.
On Habré there is almost no mention of this wonderful tulkite. Does this mean that nobody uses it? By no means.
Chromium, python, blender, and
many other large projects are built and even released using buildbot.

Big and scary
waterfall of chromium project
What kind of beast is this?
It is worth noting the main feature: buildbot is a framework. Someone may consider it a minus, but for serious projects this is a definite plus. After all, it has long been known that if you want to do something good, it is better to do it yourself.
The config, which contains instructions on how and where to build, is a python code. Because I hope that you are familiar with this language.
To battle!
It’s better to see once than hear a hundred times, so let's go straight to action.
')
We will need:- Python coupled with its dev packages (for twisted build)
- Virtualenv to create a virtual environment
- Git
Create a virtual environmentmkdir -p buildbot cd buildbot virtualenv --no-site-packages sandbox source sandbox/bin/activate easy_install sqlalchemy==0.7.10 easy_install buildbot buildbot-slave
Create a master server buildbot create-master master
Rename the default config mv master/master.cfg.sample master/master.cfg
Now run the wizard buildbot start master
You can check whether everything works by looking at the log tail -f master/twistd.log
And now, without departing from the cash register, create the slavePlacing the slave next to the master cannot be called good practice, but in our case it is permissible.
buildslave create-slave slave localhost:9989 example-slave pass
Run buildslave start slave
The slave will curse at the wizard's Twisted server deployed in the neighborhood. Do not pay attention.
If there is a special desire, we can check how it went by looking in the log
tail -f slave/twistd.log
If we did everything right, then on port
8010 of our localhost there will be such a welcome page:

Check
Log in. user: pyflakes, password: pyflakes.
Go to
localhost: 8010 / builders / runtests and see something like this:

Feel free to click on Force Build.
Our first build is ready. Press F5 and go to the build page. Are all steps green? So, the tests were successful.

By clicking on the stdout of a specific build step, you can see the console output with a detailed description of what, how and where it started.
the end
That's all, on it I will finish introduction to buildbot. If habrasoobshchestva have a desire, then I will continue the story with pleasure, I will tell you about the subtleties and rakes that I stepped on when introducing the buildbot.