Test metadata is stored in a CI database which can be in the Gerrit review database or a completely separate database.
The database is initialized and the schema is created during an initial site creation.
*** SQL Database for @PLUGIN@ *** Database server type [h2]: ? Supported options are: derby h2 mysql oracle postgresql Database server type [h2]: h2 Initialized <gerrit-site>
Schema upgrade takes place in the init plugin step:
*** SQL Database for @PLUGIN@ *** Database server type [h2]: Upgrading schema to 2 ... Migrating data to schema 2 ...
The @PLUGIN@ database can be configured in the [gerrit.config] (../../../Documentation/config-gerrit.html#_file_code_etc_gerrit_config_code) file
The database section configures where the @PLUGIN@ plugin stores per patchset test results.
[plugin "@PLUGIN@"] dbType = mysql hostname = localhost database = cidata username = gerrit2 password = secret
Paramter | Description | |
---|---|---|
database.dbType | required | Type of database server to connect to (default: H2) |
database.username | required | Username to connect to the database server as |
database.password | required | Password to authenticate to the database server with |
database.url | required | ‘jdbc:’ URL for the database |
database.driver | optional | Name of the JDBC driver class to connect to the database with |
database.connectionPool | optional | If true, use connection pooling for database connections |
database.poolLimit | optional | Maximum number of open database connections |
database.poolMinIdle | optional | Minimum number of connections to keep idle in the pool |
database.poolMaxIdle | optional | Maximum number of connections to keep idle in the pool |
database.poolMaxWait | optional | Maximum amount of time a request processing thread will wait to acquire a database connection from the pool |
database.dataSourceInterceptorClass | optional | Class that implements DataSourceInterceptor interface to monitor SQL activity |
If a unit suffix is not specified, milliseconds
is assumed.
Default is 30 seconds
.
@PLUGIN@ plugin provides an administrative interface to the database.
‘ssh’ -p ‘@PLUGIN@ gsql’ [--format {PRETTY | JSON | JSON_SINGLE}] [-c QUERY]
ssh -p 29418 localhost verify-status gsql -c “‘show tables;’”
Caller must be a member of a group that is granted the ‘Access Ci Database’ capability (provided by this plugin).
Part of Gerrit Code Review