LogoLogo
HomeBlogGet a Demo
  • Introduction
  • Install Lunar
  • Learn the basics
  • 📖Docs
    • Key concepts
    • Component JSON
    • Catalog JSON
    • Lunar CLI Reference
  • 📝Configuration
    • lunar-config.yml
      • catalogers
      • catalogers/hooks
      • domains
      • components
      • collectors
      • collectors/hooks
      • policies
    • lunar.yml
  • 🛠️Plugin SDKs
    • Plugins configuration
      • lunar-cataloger.yml
      • lunar-collector.yml
      • lunar-policy.yml
    • Bash SDK
      • Cataloger
      • Collector
    • Python SDK
      • Collector
      • Policy
        • Check
        • CheckStatus
        • Path
        • PolicyContext
        • NoDataError
        • Utility Functions
  • ⚙️SQL API
    • Overview
    • Views
      • domains
      • components
      • component_deltas
      • initiatives
      • policies
      • checks
      • prs
      • catalog
Powered by GitBook

©️ Earthly Technologies

On this page
  1. Docs

Catalog JSON

  • Type: JSON

  • Form:

    {
      "domains": {
        "<domain-name>": {
          "description": "<description>",
          "owner": "<owner>",
          "meta": {
            "<meta-key>": "<meta-value>",
            ...
          }
        },
        ...
      },
      "components": {
        "<component-name>": {
          "owner": "<owner>",
          "domain": "<domain>",
          "branch": "<branch>",
          "tags": ["<tag1>", "<tag2>", ...],
          "ciPipelines": ["<ci-pipeline1>", "<ci-pipeline2>", ...],
          "meta": {
            "<meta-key>": "<meta-value>",
            ...
          }
        },
        ...
      }
    }

The Catalog JSON is a JSON object that contains information about the domains and components.

The Catalog JSON, unlike the Component JSON, has a pre-defined structure. The semantics of the fields are defined in the domains and components pages. The same fields used to configure domains and components in lunar-config.yml are used to define the structure of the Catalog JSON.

The JSON object is formed by collecting information from the catalogers, and then merging that information with any data from lunar.yml and lunar-config.yml. The precedence in which the information is used is as follows:

  1. The information from lunar-config.yml in the domains and components section.

  2. The information from lunar.yml in each component directory.

  3. The information from the catalogers, applied in the reverse order in which the catalogers are defined in lunar-config.yml.

So, for example, if a cataloger emits a component with the same name as a component defined in lunar-config.yml, the fields would be combined, and any fields that exist in both would be overridden by the lunar-config.yml values.

If you would like to inspect the Catalog JSON, you can do so by running the following command:

lunar cataloger get-json

If you would like to execute the catalogers in development mode, and see the Catalog JSON that would be generated, you can do so by running the following command (needs to be run in the root of the Lunar configuration repository):

lunar cataloger dev --output-json
PreviousComponent JSONNextLunar CLI Reference

Last updated 29 days ago

📖