Skip to content

Commit f62c1a5

Browse files
authored
Merge pull request #1554 from basecamp/pre-connect-hook-before-remote-builds
Run pre-connect hooks before building
2 parents 031f55e + 2c1d6ed commit f62c1a5

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

lib/kamal/cli/build.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ def deliver
1414
def push
1515
cli = self
1616

17+
# Ensure pre-connect hooks run before the build, they may needed for a remote builder
18+
# or the pre-build hooks.
19+
pre_connect_if_required
20+
1721
ensure_docker_installed
1822
login_to_registry_locally
1923

test/cli/build_test.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ class CliBuildTest < CliTestCase
2121
.returns("")
2222

2323
run_command("push", "--verbose").tap do |output|
24+
assert_hook_ran "pre-connect", output
2425
assert_hook_ran "pre-build", output
2526
assert_match /Cloning repo into build directory/, output
2627
assert_match /git -C #{Dir.tmpdir}\/kamal-clones\/app-#{pwd_sha} clone #{Dir.pwd}/, output

0 commit comments

Comments
 (0)