Merge pull request #1514 from basecamp/hook-kamal-roles
Add KAMAL_ROLES to hook env variables
This commit is contained in:
@@ -133,7 +133,7 @@ module Kamal::Cli
|
||||
|
||||
def run_hook(hook, **extra_details)
|
||||
if !options[:skip_hooks] && KAMAL.hook.hook_exists?(hook)
|
||||
details = { hosts: KAMAL.hosts.join(","), command: command, subcommand: subcommand }
|
||||
details = { hosts: KAMAL.hosts.join(","), roles: KAMAL.specific_roles&.join(","), command: command, subcommand: subcommand }.compact
|
||||
|
||||
say "Running the #{hook} hook...", :magenta
|
||||
with_env KAMAL.hook.env(**details, **extra_details) do
|
||||
|
||||
@@ -69,6 +69,7 @@ class Kamal::Cli::Proxy < Kamal::Cli::Base
|
||||
end
|
||||
end
|
||||
when "get"
|
||||
|
||||
on(KAMAL.proxy_hosts) do |host|
|
||||
puts "Host #{host}: #{capture_with_info(*KAMAL.proxy.boot_config)}"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user