Last verified 2026-08-15 by executing the recipe end to end.
The recipe
main.sh
How it works
- Clone environment copies an
existing environment, agent and all, into a new alias. The source here is
whichever environment reports
isMain: true. - Publish environment promotes the draft to live within that environment. Publishing a clone cannot affect production, which is the reason to work in one.
- A publish requires a release
name. That name is what appears in the environment’s release history, so it is worth making it meaningful. - Delete environment removes the clone. This recipe asserts the environment is gone afterwards rather than trusting the delete’s status code.
- Merging a clone back and splitting live traffic are the other two halves of this workflow. See Publishing through environments.