Build/Database
< Build
Jump to navigation
Jump to search
Design Considerations
- Code must be suitable for submission to upstream
- We should store as much data about the builds in the database as possible
- The current exception to this is build logs, which are _not_ stored in the database.
- All active buildbot masters should report into the same database.
Source code
The source code currently resides at http://hg.mozilla.org/users/catlee_mozilla.com/bb_db.
model.py defines all the SQL tables as well as the mapping to python classes.
status.py implements the buildbot status plugin.
Schema
The SQL schema is close approximation of buildbot's internal data structures into SQL.
Querying database
reporter.py contains some examples of querying the database.
Hooks
The DBStatus plugin allows you to pass in a list of subscribers that get regular buildbot status notifications that are augmented with database information.
Recommended Reading
- SQLAlchemy docs: http://www.sqlalchemy.org/docs, especially the section on querying