After all targets are deployed, distman checks for "post_deploy" key.
- It runs each step, in order, similar to how pipeline steps are handled now.
- Optional: allow "env" injection for variable substitution, same as regular pipelines.
- Can be implemented exactly like "pipeline" at the top level, just deferred to the end.
Use cases:
- [Reload systemd for new unit files "script": ["systemctl daemon-reload"]
- Enable or restart services "script": ["systemctl restart apache2"]
- Run migration or setup script "script": ["bash /opt/scripts/initialize.sh"]
- Notify via webhook or Slack "script": ["curl -X POST ..."]
{
"author": "ryan@rsg.io",
"targets": {
...
},
"post_deploy": {
"reload_systemd": {
"script": ["systemctl daemon-reexec", "systemctl daemon-reload"]
},
"enable_timers": {
"script": [
"systemctl enable --now deploy@api.timer"
]
}
}
}
After all targets are deployed, distman checks for "post_deploy" key.
Use cases:
{ "author": "ryan@rsg.io", "targets": { ... }, "post_deploy": { "reload_systemd": { "script": ["systemctl daemon-reexec", "systemctl daemon-reload"] }, "enable_timers": { "script": [ "systemctl enable --now deploy@api.timer" ] } } }