Cataloger
The Cataloger Bash SDK is a set of Lunar CLI subcommands that allow you to save catalog-related information from within a cataloger.
Cataloger environment
Earthly Lunar executes catalogers in an environment set up with the following variables:
LUNAR_HUB_HOST
: The host of the Lunar Hub.LUNAR_HUB_INSECURE
: Whether to skip SSL verification of the Lunar Hub.LUNAR_CATALOGER_NAME
: The name of the cataloger.LUNAR_CATALOGER_OWNER
: The owner of the cataloger.Any secrets set in the Lunar Hub for the cataloger, via
LUNAR_CATALOGER_SECRETS=<name>=<value>;...
.
lunar catalog
CLI command
lunar catalog
CLI commandForms:
Raw form:
Component form:
Domain form:
The lunar catalog
command is used to save catalog-related information from within a cataloger. The command takes a JSON path and a value as arguments. The JSON path is used to specify the location in the JSON object where the value should be stored.
--json
--json
The --json
flag is used to specify that the value should be interpreted as a JSON object, JSON array, or JSON scalar (string, number, etc). If the flag is not provided, the value is interpreted as a raw string.
<json-path>
<json-path>
Type:
string
The JSON path is used to specify the location in the JSON object where the value should be stored. The path is specified using dot notation, where each level of the object is separated by a dot. For example, foo.bar.baz
would specify the baz
property of the bar
object, which is a property of the foo
object.
<value>
<value>
By default, the value is interpreted as a raw string. If the --json
flag is provided, the value is interpreted as a JSON object, JSON array, or JSON scalar (string, number, etc).
If the value is -
, the value is read from standard input. This is useful for piping the output of a command into the lunar catalog
command.
--name <name>
--name <name>
Type:
string
Optional
The --name
flag is used to specify the name of the component or domain.
When using the component-repo
cataloger hook, the name of the component and the domain will be inferred automatically from the cataloger context in which the command is executed.
In Component and Domain forms, the name must be provided either via this flag, via the cataloger context (component-repo
hook only), or via the JSON value.
--owner <owner>
--owner <owner>
Type:
string
Optional
The --owner
flag is used to specify the owner of the component or domain.
--branch <branch>
--branch <branch>
Type:
string
Optional
The --branch
flag is used to specify the branch of the component.
--domain <domain>
--domain <domain>
Type:
string
Optional
The --domain
flag is used to specify the domain of the component. The domain must be specified in the format foo.bar
, where foo
is the parent domain and bar
is the child domain.
--tag <tag>
--tag <tag>
Type:
string
Optional
The --tag
flag is used to specify the tag of the component. This flag may be specified multiple times to add multiple tags to the component.
--ci-pipeline <ci-pipeline>
--ci-pipeline <ci-pipeline>
Type:
string
Optional
The --ci-pipeline
flag is used to specify the CI pipeline of the component. This flag may be specified multiple times to add multiple CI pipelines to the component.
--meta <key>=<value>
--meta <key>=<value>
Type:
string
Optional
The --meta
flag is used to specify a metadata key-value pair for the component or domain. This flag may be specified multiple times to add multiple metadata entries. The value is interpreted as a raw string.
--meta-json <key>=<value>
--meta-json <key>=<value>
Type:
string
Optional
The --meta-json
flag is used to specify a metadata key-value pair for the component or domain where the value is interpreted as JSON. This flag may be specified multiple times to add multiple metadata entries. The value must be valid JSON (object, array, or scalar).
--description <description>
--description <description>
Type:
string
Optional
The --description
flag is used to specify the description of the domain.
<json-value>
<json-value>
Type:
JSON string
Optional
The JSON value is used to specify the value to be stored in the JSON object.
Last updated