1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
This repo contains some custom BuildStep classes for the use with
[buildbot](http://trac.buildbot.net/).
I currently uses this build steps with buildbot-0.8.3_p1. You maybe
have to change some parts, if you want to use it with other versions.
# Doxygen
The doxygen step should be used, if you are generating docs with
[doxygen](http://www.doxygen.org/). It is mainly just cosmetic to
display the step in the build details with a nice heading.
To use the step you could use the following snippet, assuming that
this repository is cloned next to your master.cfg:
:::python
from buildbot_ext.Doxygen import Doxygen
build = factory.BuildFactory()
# [...] you maybe already have added other steps
build.addStep(Doxygen(workdir="build/doc"))
# CPPUnitTest
The CPPUnitTest step is a simple wrapper for the normal Test step
that adds a link to the test-results to the build page. It does not
transfer the test.xml file to the buildmaster. It assumes that you do
that step manually.
To use the step you could use the following snippet, assuming that
this repository is cloned next to your master.cfg:
:::python
from buildbot_ext.CPPUnitTest import CPPUnitTest
build = factory.BuildFactory()
# [...] you maybe already have added other steps
build.addStep(CPPUnitTest(command=["make", "test"], workdir="build/test", logfiles={"debug": "debug.log"})),
build.addStep(FileUpload(slavesrc="test/test.xml", masterdest=WithProperties("~/public_html/%(buildername)s/%(buildnumber)s/tests/test.xml")))
build.addStep(FileUpload(slavesrc="test/report.xsl", masterdest=WithProperties("~/public_html/%(buildername)s/%(buildnumber)s/tests/report.xsl")))
# GroupBuildStep
This step simply groups a number of single steps and only show them as
one entry on the build page. It has also the ability to set a number
of links, so that it is perfect suitable to group a few upload tasks.
To use the step you could use the following snippet, assuming that
this repository is cloned next to your master.cfg:
:::python
from buildbot_ext.GroupBuildStep import GroupBuildStep
build = factory.BuildFactory()
# [...] you maybe already have added other steps
build.addStep(GroupBuildStep(steps = [
FileUpload(slavesrc="somefile", masterdest=WithProperties('/%(buildername)s/%(buildnumber)s/')),
FileUpload(slavesrc="secondfile", masterdest=WithProperties('/%(buildername)s/%(buildnumber)s/')),
], name = 'upload', description = 'uploading', descriptionDone = 'upload', links = [
{'title': somefile', 'href': WithProperties('/%(buildername)s/%(buildnumber)s/somefile')},
{'title': 'secondfile', 'href': WithProperties('/%(buildername)s/%(buildnumber)s/secondfile')}
]))
|