Bundles
One hash-verified file with everything a deploy needs, built once and deployed everywhere.
trek bundle create # writes trek-bundle-<plan head>.zip
trek bundle create -o release-1.4.zip --no-config
trek bundle verify release-1.4.zip
trek --bundle release-1.4.zip status -e prod
trek --bundle release-1.4.zip deploy -e prod
What is in a bundle
A zip file with trek.plan, the folders of every planned change, repeatable/, the environment scripts under environments/, trek.yaml (unless --no-config) and a manifest, trek-bundle.json, listing each file's SHA-256, the provider, the plan head and a content hash that identifies the bundle.
Text is stored normalized (no byte-order mark, LF line endings) and entries are sorted with fixed timestamps, so the same commit produces a byte-identical bundle on Windows, macOS and Linux. A project with problems (trek plan check errors) cannot be bundled.
Running from a bundle
--bundle <file> works with every command that reads the project: status, deploy, revert, rebase, verify, repair, diff-schema, render, vars, plan check and plan show. Before anything runs, trek checks:
- every file matches its hash, none is missing and none was added;
- the manifest's content hash matches its file list;
- the plan head computed from the extracted scripts equals the one in the manifest.
Any mismatch stops the run and names the files. The bundle is extracted to a temporary folder that is deleted on exit. Commands that write project files (add, tag, rework, init) refuse --bundle.
Configuration
When the bundle includes trek.yaml, it is used, so the environments are frozen with the scripts. Secrets are never stored: keep them as ${env:NAME} or ${file:path} references, which resolve on the machine that deploys (relative paths from --project). Bundle with --no-config to read trek.yaml from --project at deploy time instead.