Bazelregistry

kind: bazelregistry

sourceconditiontarget

Description

source

The Bazelregistry "source" retrieves an information from a bazelregistry file.

condition

The Bazelregistry "condition" tests that an information exist in a bazelregistry file.

target

Not supported. Feel free to open an issue if you want to see this implemented.

Parameters

NameTypeDescriptionRequired
modulestring

Module specifies the Bazel module name to query from the registry

compatible:

  • source
  • condition

example:

  • rules_go
  • rules_python
  • gazelle
urlstring

URL specifies the custom registry URL (defaults to Bazel Central Registry)

compatible:

  • source
  • condition

default: https://raw.githubusercontent.com/bazelbuild/bazel-central-registry/main/modules/{module}/metadata.json

example:

  • https://raw.githubusercontent.com/bazelbuild/bazel-central-registry/main/modules/{module}/metadata.json
  • https://mycompany.com/bazel-registry/modules/{module}/metadata.json

remarks:

  • The URL must contain {module} placeholder which will be replaced with the module name
  • If not specified, defaults to the official Bazel Central Registry
versionfilterobject

VersionFilter provides parameters to specify version pattern and its type like regex, semver, or just latest.

compatible:

  • source

default: kind: latest

    kindstringspecifies the version kind such as semver, regex, or latest
    patternstringspecifies the version pattern according the version kind for semver, it is a semver constraint for regex, it is a regex pattern for time, it is a date format
    regexstringspecifies the regex pattern, used for regex/semver and regex/time. Output of the first capture group will be used.
    replaceallobjectreplaceAll applies a regex replacement to version strings before filtering. This is useful for transforming versions (e.g., curl-8_15_0 to curl-8.15.0) before regex extraction.
    strictbooleanstrict enforce strict versioning rule. Only used for semantic versioning at this time

Example

sources:
    rules_python:
        name: Get latest version of Bazel module rules_python
        kind: bazelregistry
        spec:
            module: rules_python
            versionfilter:
                kind: semver
                pattern: '>=0.25.0'
Top