To generator a starter hook:
$ ufo new hook ufo create .ufo/config/hooks/ufo.rb
You can use hooks to run scripts at specific steps of the
|build||When ufo builds the Task Definition and CloudFormation template. Build is automatically run as part of
|destroy||When deletes the ECS resources. IE:
|ship||When ufo deploys to ECS. IE:
These lifecycle points at the
ufo command level. Here’s are examples to help explain.
The command name corresponds to the
ufo commands: build, push, etc.
|label||A human-friendly label so you can see what hooks is being run.|
|execute||The script or command to run. IE: path/to/some/script.sh|
|exit_on_fail||Whether or not to continue process if the script returns an failed exit code.|
Instead of using a script for the hook
execute option, you can also use a Ruby object. This provides some more control over the current process. See: Ruby Hooks