The Elasticsearch driver supports reporters only. The purpose of the driver is to export build and buildset results to an Elasticsearch index.
If the index does not exist in Elasticsearch then the driver will create it with an appropriate mapping for static fields.
The driver can add job’s variables and any data returned to Zuul via zuul_return respectively into the job_vars and job_returned_vars fields of the exported build doc. Elasticsearch will apply a dynamic data type detection for those fields.
Elasticsearch supports a number of different datatypes for the fields in a document. Please refer to its documentation.
The Elasticsearch reporter uses new ES client, that is only supporting current version of Elastisearch. In that case the reporter has been tested on ES cluster version 7. Lower version may be working, but we can not give tu any guarantee of that.
The connection options for the Elasticsearch driver are:
<Elasticsearch connection>.driver (required)
The connection must set
<Elasticsearch connection>.uri (required)
Database connection information in the form of a comma separated list of
host:port. The information can also include protocol (http/https) or username and password required to authenticate to the Elasticsearch.
where user and password is optional.
Turn on SSL. This option is not required, if you set
httpsin uri param.
Make sure we verify SSL certificates.
Path to CA certs on disk.
Path to the PEM formatted SSL client certificate.
Path to the PEM formatted SSL client key.
- <Elasticsearch connection>.driver (required)
Example of driver configuration:
[connection elasticsearch] driver=elasticsearch uri=https://managesf.sftests.com:9200
Additional parameters to authenticate to the Elasticsearch server you can find in client class.
This reporter is used to store build results in an Elasticsearch index.
The reporter supports the following attributes:
The Elasticsearch index to be used to index the data. To prevent any name collisions between Zuul tenants, the tenant name is used as index name prefix. The real index name will be:
- pipeline.<reporter>.<elasticsearch source>.index
<index-name>.<tenant-name>-<YYYY>.<MM>.<DD> The index will be created if it does not exist. .. attr:: index-vars :default: false Boolean value that determines if the reporter should add job's vars to the exported build doc. NOTE: The index-vars is not including the secrets. .. attr:: index-returned-vars :default: false Boolean value that determines if the reporter should add zuul_returned vars to the exported build doc.
- pipeline: name: check success: elasticsearch: index: 'zuul-index'