Building doesn't need a deploy lock

This commit is contained in:
Donal McBreen
2024-04-03 12:39:40 +01:00
parent 6a7c90cf4d
commit d2a719998a

View File

@@ -5,15 +5,12 @@ class Kamal::Cli::Build < Kamal::Cli::Base
desc "deliver", "Build app and push app image to registry then pull image on servers" desc "deliver", "Build app and push app image to registry then pull image on servers"
def deliver def deliver
mutating do
push push
pull pull
end end
end
desc "push", "Build and push app image to registry" desc "push", "Build and push app image to registry"
def push def push
mutating do
cli = self cli = self
verify_local_dependencies verify_local_dependencies
@@ -51,14 +48,14 @@ class Kamal::Cli::Build < Kamal::Cli::Base
else else
raise raise
end end
end else
raise
end end
end end
end end
desc "pull", "Pull app image from registry onto servers" desc "pull", "Pull app image from registry onto servers"
def pull def pull
mutating do
on(KAMAL.hosts) do on(KAMAL.hosts) do
execute *KAMAL.auditor.record("Pulled image with version #{KAMAL.config.version}"), verbosity: :debug execute *KAMAL.auditor.record("Pulled image with version #{KAMAL.config.version}"), verbosity: :debug
execute *KAMAL.builder.clean, raise_on_non_zero_exit: false execute *KAMAL.builder.clean, raise_on_non_zero_exit: false
@@ -66,11 +63,9 @@ class Kamal::Cli::Build < Kamal::Cli::Base
execute *KAMAL.builder.validate_image execute *KAMAL.builder.validate_image
end end
end end
end
desc "create", "Create a build setup" desc "create", "Create a build setup"
def create def create
mutating do
if (remote_host = KAMAL.config.builder.remote_host) if (remote_host = KAMAL.config.builder.remote_host)
connect_to_remote_host(remote_host) connect_to_remote_host(remote_host)
end end
@@ -89,17 +84,14 @@ class Kamal::Cli::Build < Kamal::Cli::Base
end end
end end
end end
end
desc "remove", "Remove build setup" desc "remove", "Remove build setup"
def remove def remove
mutating do
run_locally do run_locally do
debug "Using builder: #{KAMAL.builder.name}" debug "Using builder: #{KAMAL.builder.name}"
execute *KAMAL.builder.remove execute *KAMAL.builder.remove
end end
end end
end
desc "details", "Show build setup" desc "details", "Show build setup"
def details def details