Documentation
¶
Overview ¶
Command bundle assembles the modular Starlark sources in flows/ into the single self-contained gems/gitlab-deploy-driver-argo-rollouts/scripts/deploy.star the driver gem ships.
The output is a deploy driver *fragment*, not a program: the orchestration engine owns main(), and Rails concatenates the two (see Gitlab::Cd::Driver::Orchestration.assemble) before sending one blob to kas. kas resolves load() only for registered runtime modules (e.g. "gitlab-function"), never local files, which is why the shipped fragment has to be a single file.
The sources declare their local dependencies with load("./<path>.star", ...), resolved relative to the importing file; this tool walks that graph from the entrypoint (flows/entrypoint.star), inlines each fragment once in dependency order into one flat Starlark namespace, hoists the runtime module loads to the top, and strips the local loads (superfluous once inlined) and every comment.
The entrypoint is emitted last, so its `def deploy(` lands at the bottom of the output where assemble's rename finds it.
Regenerate with `make flows-bundle`. Do not edit the generated deploy.star by hand; the CI freshness check re-runs this tool and fails on any diff.