Add option to run pre/post commands for any container (#73)

* Add option to run pre commands on arbitrary container

* Correctly handle quoted args in commands

* Provide defaults for test version arg

* Allow filtering of target containers

* Add documentation on exec commands

* Use mysqldump in exec test

* Add mysqldump section to recipes

* Also run commands test in swarm mode

* Use name instead of id

* Add syntax highlighting

* Add missing license headers
This commit is contained in:
Frederik Ring
2022-02-22 07:53:33 +01:00
committed by GitHub
parent 3ded77448c
commit 0504a92a1f
14 changed files with 366 additions and 11 deletions

View File

@@ -38,6 +38,13 @@ func main() {
}()
s.must(func() error {
runPostCommands, err := s.runCommands()
defer func() {
s.must(runPostCommands())
}()
if err != nil {
return err
}
restartContainers, err := s.stopContainers()
// The mechanism for restarting containers is not using hooks as it
// should happen as soon as possible (i.e. before uploading backups or