Skip to main content

!repo-root

The !repo-root Atmos YAML function is used to retrieve the root directory of the Atmos repository.

Usage

The !repo-root function can be called with default value:

  # Get the root directory of the Atmos repository `!repo-root`.
# If the Git root is not found, it will return a default value if specified; otherwise, it returns an error.
`!repo-root <default-value>`

Examples

vars:
# `base_path` will be set to the root directory of the Atmos repository if present otherwise it will return an error
base_path: !repo-root
# `base_path` will be set to the default value `/default/path` if the Atmos repository root is not present
base_path: !repo-root <default-value>