6.4.6. Database Management¶
The results of the CI are stored in the “project database” (an SQLite database). The web dashboard can display the analysis from such a database.
The tool cidbman (Continuous Integration DataBase MANagement)
offers some additional subcommands for managing a project database.
Use cidbman --help to view all available subcommands.
6.4.6.1. Manually importing analysis results¶
The project database is normally written by axivion_ci.
However it is also possible to manually write a database without using the Axivion CI.
- Possible use cases of the standalone DB importer:
use Python scripting to manipulate the analysis results before they are imported
run the analysis and the DB import on different computers
First, run an analysis and save the results in our internal binary format:
axivion_analysis --ir input.ir --output_binary violations.ar
If the project database does not exist yet, you can use this command to create a new database:
cidbman database create project.db
Then later you can append the analysis results to a project database:
cidbman version import violations.ar project.db
Note that because the database import determines issue owners (via VCS blame) and connects issues according to the source code diff to the previous version, the database importer requires the VCS configuration. It also requires direct access to the analyzed source code in the current workspace (only the previous source code version is retrieved from the VCS).
Thus, the cidbman version import command needs to be run in a workspace
where the same source code version is checked out as was during analysis.
It also needs BAUHAUS_CONFIG to be set, so that it can read the VCS configuration.
Finally, manually running the database importer does not automatically notify the dashboard (invalidating caches, sending notification mails). Use the following two commands to do this:
cidbman dashboard ping project.db
cidbman dashboard mail project.db