📄️ Built-in hooks
You can use hooks to execute actions at specific stages of stack deploy and undeploy operations. Takomo has two built-in hooks, and you can also implement your own.
📄️ Command hook
The command hook executes the specified shell command.
📄️ Checksum hook
The checksum hook calculates a checksum from a specified directory. The checksum is calculated recursively, i.e. all files and directories under the specified directory are included in the checksum.
📄️ Custom hooks
You can provide custom hooks by placing plain JavaScript files, with .js file extension, into the hooks directory. Each file must export a hook provider object. Takomo uses the provider to initialize the actual hook.
📄️ Sharing data between hooks
Hooks can expose values to other hooks by returning a hook output object. Takomo stores the returned value with a hook's name in a mutable variables object that it then passes to the subsequent hooks. Takomo discards the mutable variables object after the stack operation completes, which means the exposed data is not visible to hooks executed in other stacks.