OLD | NEW |
1 Instructions on how to use the buildrunner to execute builds. | 1 # Instructions on how to use the buildrunner to execute builds. |
2 | 2 |
3 # Introduction | 3 The buildrunner is a script which extracts buildsteps from builders and runs |
| 4 them locally on the slave. It is being developed to simplify development on and |
| 5 reduce the complexity of the Chromium build infrastructure. When provided a |
| 6 master name (with `master.cfg` inside) and a builder, it will either execute |
| 7 steps sequentially or output information about them. |
4 | 8 |
5 The buildrunner is a script which extracts buildsteps from builders and runs the
m locally on the slave. It is being developed to simplify development on and red
uce the complexity of the Chromium build infrastructure. When provided a master
name (with `master.cfg` inside) and a builder, it will either execute steps sequ
entially or output information about them. | 9 `runbuild.py` is the main script, while `runit.py` is a convenience script that |
| 10 sets up `PYTHONPATH` for you. Note that you can use `runit.py` to conveniently |
| 11 run other scripts in the `build/` directory. |
6 | 12 |
7 `runbuild.py` is the main script, while `runit.py` is a convenience script that
sets up `PYTHONPATH` for you. Note that you can use `runit.py` to conveniently r
un other scripts in the `build/` directory. | 13 [TOC] |
8 | 14 |
9 # Master/Builder Selection | 15 ## Master/Builder Selection |
10 | 16 |
11 `scripts/tools/runit.py scripts/slave/runbuild.py --list-masters` | 17 scripts/tools/runit.py scripts/slave/runbuild.py --list-masters |
12 | 18 |
13 will list all masters in the search path. Select a mastername (alternatively, us
e --master-dir to use a specific directory). | 19 will list all masters in the search path. Select a mastername |
| 20 (alternatively, use --master-dir to use a specific directory). |
14 | 21 |
15 Next, we need to pick a builder or slave hostname to build. The slave hostname i
s only used to locate a suitable builder, so it need not be the actual hostname
of the slave you're on. | 22 Next, we need to pick a builder or slave hostname to build. The slave hostname |
| 23 is only used to locate a suitable builder, so it need not be the actual hostname |
| 24 of the slave you're on. |
16 | 25 |
17 To list all the builders in a master, run: | 26 To list all the builders in a master, run: |
18 | 27 |
19 `scripts/tools/runit.py scripts/slave/runbuild.py mastername --list-builders` | 28 scripts/tools/runit.py scripts/slave/runbuild.py mastername --list-builders |
20 | 29 |
21 Example, if you're in `/home/user/chromium/build/scripts/slave/`: | 30 Example, if you're in `/home/user/chromium/build/scripts/slave/`: |
22 | 31 |
23 `scripts/tools/runit.py scripts/slave/runbuild.py chromium --list-builders` | 32 scripts/tools/runit.py scripts/slave/runbuild.py chromium --list-builders |
24 | 33 |
25 will show you which builders are available under the `chromium` master. | 34 will show you which builders are available under the `chromium` master. |
26 | 35 |
27 # Step Inspection and Execution | 36 ## Step Inspection and Execution |
28 | 37 |
29 You can check out the list of steps without actually running them like so: | 38 You can check out the list of steps without actually running them like so: |
30 | 39 |
31 `scripts/tools/runit.py scripts/slave/runbuild.py chromium build56-m1 --list-st
eps` | 40 scripts/tools/runit.py scripts/slave/runbuild.py chromium build56-m1 --list
-steps |
32 | 41 |
33 (Note that some exotic steps, such as gclient steps, won't show up in buildrunne
r.) You can show the exact commands of most steps with --show-commands: | 42 Note that some exotic steps, such as gclient steps, won't show up in |
| 43 buildrunner.) You can show the exact commands of most steps with --show- |
| 44 commands: |
34 | 45 |
35 `scripts/tools/runit.py scripts/slave/runbuild.py chromium build56-m1 --show-co
mmands` | 46 scripts/tools/runit.py scripts/slave/runbuild.py chromium build56-m1 --show
-commands |
36 | 47 |
37 Finally, you can run the build with: | 48 Finally, you can run the build with: |
38 | 49 |
39 `scripts/tools/runit.py scripts/slave/runbuild.py mastername buildername/slaveho
st` | 50 scripts/tools/runit.py scripts/slave/runbuild.py mastername buildername/slav
ehost |
40 | 51 |
41 Example, if you're in `/home/user/chromium/build/scripts/slave/`: | 52 Example, if you're in `/home/user/chromium/build/scripts/slave/`: |
42 | 53 |
43 `scripts/tools/runit.py scripts/slave/runbuild.py chromium build56-m1` | 54 scripts/tools/runit.py scripts/slave/runbuild.py chromium build56-m1 |
44 | 55 |
45 or | 56 or |
46 | 57 |
47 `scripts/tools/runit.py scripts/slave/runbuild.py chromium 'Linux x64'` | 58 scripts/tools/runit.py scripts/slave/runbuild.py chromium 'Linux x64' |
48 | 59 |
49 `--stepfilter` and `--stepreject`` can be used to filter steps to execute based
on a regex (you can see which with `--list-steps`). See `-help`for more info. | 60 `--stepfilter` and `--stepreject`` can be used to filter steps to execute based |
| 61 on a regex (you can see which with `--list-steps`). See `-help`for more info. |
50 | 62 |
51 # Properties | 63 ## Properties |
52 | 64 |
53 Build properties and factory properties can be specified using `--build-properti
es` and `--factory-properties`, respectively. Since build properties contain a m
aster and builder directive, any master or builder options on the CLI are ignore
d. Properties can be inspected with either or both of --output-build-properties
or --output-factory-properties. | 65 Build properties and factory properties can be specified using `--build- |
| 66 properties` and `--factory-properties`, respectively. Since build properties |
| 67 contain a master and builder directive, any master or builder options on the CLI |
| 68 are ignored. Properties can be inspected with either or both of --output-build- |
| 69 properties or --output-factory-properties. |
54 | 70 |
55 # Monitoring | 71 ## Monitoring |
56 | 72 |
57 You can specify a log destination (including '`-`' for stdout) with `--logfile`.
Enabling `--annotate` will enable annotator output. | 73 You can specify a log destination (including '`-`' for stdout) with `--logfile`. |
| 74 Enabling `--annotate` will enable annotator output. |
58 | 75 |
59 # Using Within a Buildstep | 76 ## Using Within a Buildstep |
60 | 77 |
61 The an annotated buildrunner can be invoked via chromium\_commands.AddBuildStep(
). Set the master, builder, and any stepfilter/reject options in factory\_proper
ties. For example usage, see f\_linux\_runnertest in master.chromium.fyi/master.
cfg and check\_deps2git\_runner in chromium\_factory.py | 78 The an annotated buildrunner can be invoked via |
| 79 chromium_commands.AddBuildStep(). Set the master, builder, and any |
| 80 stepfilter/reject options in factory_properties. For example usage, see |
| 81 f_linux_runnertest in master.chromium.fyi/master.cfg and |
| 82 check_deps2git_runner in chromium_factory.py |
62 | 83 |
63 # More Information | 84 ## More Information |
64 | 85 |
65 Running with `--help` provides more detailed usage and options. If you have any
questions or issues please contact xusydoc@chromium.org. | 86 Running with `--help` provides more detailed usage and options. If you have any |
| 87 questions or issues please contact xusydoc@chromium.org. |
OLD | NEW |