Registry
The registry provides access to metadata about available evaluation stacks. It retrieves
environments from one of the following data providers, which can be configured
through the EVA_REGISTRY_PROVIDER environment variable:
local: The registry extracts all environments that are available as images in the local Docker installation.gitlab: The registry connects to the container registry of a GitLab installation and retrieves environments from the available images. To use this provider, the base URLs of the GitLab instance and its container registry must be specified usingEVA_REGISTRY_GITLAB_URLandEVA_REGISTRY_GITLAB_DOCKER_REGISTRY_URL. Since a GitLab container registry is associated with a specific project, the corresponding project ID must also be provided. This ID can be found on the project's main page below the project name and is configured throughEVA_REGISTRY_GITLAB_PROJECT_ID. If the project's container registry is private, an access token with theread_registryscope must be generated for the project and configured using theEVA_REGISTRY_GITLAB_USERandEVA_REGISTRY_GITLAB_TOKENvariables.
Environments are cached by the registry for a configurable period of time. This reduces the need to
contact the underlying data provider for every request and improves response times. However, as a
consequence, newly added environments or changes to existing metadata may not become visible
immediately. The cache lifetime (TTL) can be configured using the EVA_REGISTRY_CACHE_TTL variable
and is specified in seconds. A value of -1 disables cache expiration, resulting in an infinite TTL.
The cache can be disabled by setting EVA_REGISTRY_CACHE_TTL=0.
Evaluators are obtained statically through the EvaluatorRegistry class.
Endpoints
The registry has an HTTP interface that accepts requests on port 7777.
GET /stacks
Returns all evaluation stacks that are available.
EvaluatorsResponse: {
stacks: EvaluationStack[],
last_update: string
}
evaluators: Available evaluation stacks with metadatalast_update: String in ISO8601 format indicating when the last update was performed by the data provider.
EvaluationStack: {
environment: string
evaluator: EvaluatorDeclaration
ref: string
}
environment: ID of the environmentevaluator: Metadata about the evaluatorref: Selector
EvaluatorDeclaration: {
id: string
capability: EvaluatorCapability {
compile: bool
test: bool,
coverage: bool,
style: bool
}
supported_envs: string[]
excluded_envs: string[]
default_env: string[]
}
id: ID of the evaluatorcapability: See Evaluators.supported_envs: See Evaluatorsexcluded_envs: See Evaluatorsdefault_env: See Evaluators
GET /stacks/<ref>
Looks up the evaluation stack by the given selector ref and returns the metadata, if
available. If no matching stack can be found, the endpoint returns an HTTP 404 status code.
GetStackResponse: {
stack: EvaluationStack,
last_update: string
}