atmos.vendor
The atmos.vendor function runs atmos vendor through the current Atmos executable. Use it to pull, verify,
update, and inspect vendored components and stack dependencies from automation.
Usage
atmos.vendor(
*positionals,
flags = {},
args = [],
working_directory = ...,
env = ...,
output = "stream",
check = True,
)
Subcommands
Pass the subcommand and any positional arguments as strings before the keyword arguments. The call
atmos.vendor("pull") runs atmos vendor pull.
| Subcommand | Purpose |
|---|---|
pull | Pull vendored components and stack dependencies. |
update | Update vendored component versions to the latest allowed release. |
verify | Verify vendored files match vendor.lock.yaml. |
diff | Show the Git diff between two versions of a vendored component. |
get | Read the pinned version of a vendored component. |
set | Set the pinned version of a vendored component. |
clean | Remove lock-owned vendored files. |
list | List vendor configurations. |
config | Read, edit, and list raw vendor manifest configuration. |
See the atmos vendor command reference for the complete list of subcommands and
flags.
Arguments
*positionals(Optional) Strings placed on the command line right after
vendor, in order: the subcommand and its positional arguments. Every value must be a string.flags(Optional) A dictionary of command-line options; see flag translation. A bare key such as
"component"becomes--component, and registered shorthands resolve to their long form.args- (Optional) A list or tuple of strings appended after the flags.
working_directory,env,output,check(Optional) See
atmos.runfor process options and defaults.
Options other than the positionals are keyword-only.
Returns
A result with stdout, stderr, and exit_code. See atmos.run for output and error behavior.
Examples
Pull one component
atmos.vendor("pull", flags = {"component": "vpc", "stack": "dev"})
This runs atmos vendor pull --component=vpc --stack=dev.
Fail a pipeline when vendored files drift
result = atmos.vendor("verify", output = "capture", check = False)
if result.exit_code != 0:
fail("Vendored files do not match vendor.lock.yaml:\n" + result.stderr)
ui.success("Vendored files match the lock file.")
Check for available updates
updates = atmos.vendor("update", flags = {"check": True, "format": "json"}, output = "capture")
print(updates.stdout)
Related
atmos.runruns any Atmos command from an argument list.atmos vendordocuments every subcommand and flag.- Atmos Automation Language and the script step