Skip to main content

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.

SubcommandPurpose
pullPull vendored components and stack dependencies.
updateUpdate vendored component versions to the latest allowed release.
verifyVerify vendored files match vendor.lock.yaml.
diffShow the Git diff between two versions of a vendored component.
getRead the pinned version of a vendored component.
setSet the pinned version of a vendored component.
cleanRemove lock-owned vendored files.
listList vendor configurations.
configRead, 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.run for 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)