catalogers
Last updated
Last updated
lunar-config.yml -> catalogers
Type: array
Form:
Catalogers are used to synchronize software catalog information, such as domains, and components, with external systems.
The catalog information resulting from catalogers is merged in the order in which the catalogers are defined. This means that if two catalogers define the same field (e.g. owner
) within the same component, the last one will take precedence.
After the cataloger information is merged, the information collected from any files, and any component and domain information from , is merged to form the final catalog JSON, which is then used by Lunar to form the structure of domains and components internally.
Example catalogers definition:
lunar-config.yml -> catalogers.<cataloger-index>
Type: object
Forms
Uses form (use an external cataloger plugin):
Run form (define a cataloger inline):
Main form (define a cataloger inline with a main file):
Catalogers are used to dynamically import information about components and domains from external systems. They are run on a schedule or in response to certain events, such as a commit to a repository.
Catalogers can either be imported (Uses form), defined as an inline command (Run form), or defined as a script with a main file (Main form). When a cataloger is defined inline (Run and Main forms), a hook must be specified to determine when the cataloger should run.
name
lunar-config.yml -> catalogers.<cataloger-index>.name
Type: string
Required for Run and Main cataloger forms, Optional for Uses cataloger form
The name of the cataloger. This is used to identify the cataloger in the Lunar UI and logs.
uses
lunar-config.yml -> catalogers.<cataloger-index>.uses
Type: string
Forms
GitHub form: github://<org>/<repo>@<version>
Local form: ./<path-to-cataloger>
Required for Uses cataloger form
The uses
field specifies an external (plugin) cataloger to use. The cataloger can be a third-party cataloger, or a local cataloger defined in a subdirectory.
with
lunar-config.yml -> catalogers.<cataloger-index>.with
Type: object
Optional
The with
field specifies the inputs to pass to the cataloger plugin. The inputs are defined in the cataloger's configuration file.
run<language>
lunar-config.yml -> catalogers.<cataloger-index>.run<language>
Type: string
Required in Run cataloger form
Defines the command to execute when the cataloger is invoked. Only Bash
is supported currently. So runBash
is the only valid fields.
If an install.sh
file is present in the same directory as lunar-config.yml
or lunar-cataloger.yml
, Lunar will run the install script before running the cataloger script. This script is executed only once in each environment.
runBash
lunar-config.yml -> catalogers.<cataloger-index>.runBash
Type: string
The runBash
field specifies the bash cataloger script to run.
main<language>
lunar-config.yml -> catalogers.<cataloger-index>.main<language>
Type: string
Required in Main cataloger form
Defines the main file path used to execute when the cataloger is invoked. Only Bash
is supported currently. So mainBash
is the only valid field.
The file path is relative to the root of the Lunar configuration repository. In the case of an external plugin definition, the path is relative to the plugin directory.
If an install.sh
file is present in the same directory as lunar-config.yml
or lunar-cataloger.yml
, Lunar will run the install script before running the cataloger script. This script is executed only once in each environment.
mainBash
lunar-config.yml -> catalogers.<cataloger-index>.mainBash
Type: string
The mainBash
field specifies the bash cataloger script to run.
hook
lunar-config.yml -> catalogers.<cataloger-index>.hook
Type: object
Required for Run and Main cataloger forms
The hook
field specifies when the cataloger should run. The hook can be a cron job, a repository event, or a component event.
For more information on how to configure hooks, see .