Add a pre-connect hook

This can be used for hooks that should run before connecting to remote
hosts. An example use case is pre-warming DNS.
This commit is contained in:
Donal McBreen
2023-05-24 11:39:48 +01:00
parent 483b893018
commit 66f9ce0e90
8 changed files with 75 additions and 9 deletions

View File

@@ -8,16 +8,16 @@ class MainTest < IntegrationTest
mrsk :deploy
assert_app_is_up version: first_version
assert_hooks_ran "pre-build", "post-deploy"
assert_hooks_ran "pre-connect", "pre-build", "post-deploy"
second_version = update_app_rev
mrsk :redeploy
assert_app_is_up version: second_version
assert_hooks_ran "pre-build", "post-deploy"
assert_hooks_ran "pre-connect", "pre-build", "post-deploy"
mrsk :rollback, first_version
assert_hooks_ran "post-deploy"
assert_hooks_ran "pre-connect", "post-deploy"
assert_app_is_up version: first_version
details = mrsk :details, capture: true