Release 0.59#
2024-10-23 ยท Full Changelog
Per-stage exec hooks#
Back in 0.51 when we introduced the stages support every stage had a single exec hook that allowed you to execute a command in a container when it enters/exits a stage. It was a good start, but it had one hole in it - it was not possible to execute a command on a host machine when a container enters/exits a particular stage.
Thanks to @steiler the stages support for execs became much more powerful in this release with allowing you to flexibly define where command is executed (host or container) and when (what stage and what event). Here is an example of a refactored exec hooks:
nodes:
node1:
stages:
create-links:
exec:
- command: ls /sys/class/net/
target: container #(1)!
phase: on-enter #(2)!
target
defaults to "container" and can be omitted. Possible valuescontainer
orhost
phase
defaults to "on-enter" and can be omitted. Possible valueson-enter
oron-exit
Note, this is a breaking change if you used execs in the stages before.