Tracker Publisher Plugin¶
This publisher plugin applies the quality gate to a successfully completed workflow. It then publishes the result as a note in the tracker issue that is specified by the related workflow labels and the tracker instances configuration file.
It exposes no user-facing endpoints.
You can set the
TRACKERPUBLISHER_DEBUG_LEVEL (all upper-cased) or
DEBUG_LEVEL environment variables
DEBUG to add additional information in the console for the launched service. It defaults to
INFO. (Please note that setting
DEBUG will produce tons of logs.)
The possible values are
FATAL. Those values
are from the most verbose,
NOTSET, which shows all logs, to the least verbose,
only shows fatal errors.
TRACKERPUBLISHER_DEBUG_LEVEL is not defined then the value of
DEBUG_LEVEL is used (or
DEBUG_LEVEL is not defined either).
Access logs are only shown at
TRACKERPUBLISHER_INSTANCES (all upper-cased) environment variable must be
defined to use the plugin. This variable must refer to an existing file that
contains tracker instances definitions.
If the content of this referred file changes, the tracker instances definitions used by the Tracker publisher plugin will change accordingly. You do not need to restart the plugin.
Tracker Instances File¶
The tracker publisher plugin needs at least one configured tracker instance. You must create a YAML file to configure your instance or instances.
Tracker instances files must use YAML syntax and may have a
A tracker instances file has two mandatory sections:
- name: main.instance
- name: backup.instance
default-instance is the name of the default tracker instance. This section
is mandatory and the instance name must be present in
instances section, which is also mandatory, lists the available tracker
instances. It must contain at least one instance that will be used by Tracker
publisher plugin to publish the quality gate results.
Each tracker instance is described by the following (possibly optional) items:
name: name of a tracker instance. Must be unique. Required.
type: type of a tracker instance. Currently supported types:
keep-history: true or false. When set to
false, the most recent results for an applied quality gate on the target are updated, otherwise, all the results are kept. Required.
endpoint: URL of a tracker instance. Required.
token: tracker authentication token.
default-qualitygate: name of the default quality gate to apply when the instance is used.
This plugin has a configuration file (
trackerpublisher.yaml by default) that describes
the common service configuration options.
If no configuration file is found it will default to the following values:
- name: default
The configuration included in the ‘allinone’ image is described in “Common settings.” The
listening port is 7797 and the bind address is
127.0.0.1 as the service exposes no user-facing endpoints.
The Tracker publisher plugin subscribes to the following events:
The Tracker publisher plugin exposes an
/inbox endpoint that is used by the event bus to post relevant events.
If you want to manually start the Tracker publisher plugin, use the following command:
python -m opentf.plugins.trackerpublisher.main [--context context] [--config configfile]
Additional command-line options are available and described in “Command-line options.”