Only multi-stage actions should talk
This commit is contained in:
@@ -8,8 +8,10 @@ class Mrsk::Cli::App < Mrsk::Cli::Base
|
|||||||
say "Ensure no other version of the app is running...", :magenta
|
say "Ensure no other version of the app is running...", :magenta
|
||||||
stop
|
stop
|
||||||
|
|
||||||
|
say "Get most recent version available as an image...", :magenta
|
||||||
using_version(options[:version] || most_recent_version_available) do |version|
|
using_version(options[:version] || most_recent_version_available) do |version|
|
||||||
say "Start container with version #{version} (or reboot if already running)...", :magenta
|
say "Start container with version #{version} (or reboot if already running)...", :magenta
|
||||||
|
|
||||||
MRSK.config.roles.each do |role|
|
MRSK.config.roles.each do |role|
|
||||||
on(role.hosts) do |host|
|
on(role.hosts) do |host|
|
||||||
begin
|
begin
|
||||||
@@ -180,14 +182,12 @@ class Mrsk::Cli::App < Mrsk::Cli::Base
|
|||||||
|
|
||||||
def most_recent_version_available(host: MRSK.primary_host)
|
def most_recent_version_available(host: MRSK.primary_host)
|
||||||
version = nil
|
version = nil
|
||||||
say "Retrieve most recent version available as an image...", :magenta
|
|
||||||
on(host) { version = capture_with_info(*MRSK.app.most_recent_version_from_available_images).strip }
|
on(host) { version = capture_with_info(*MRSK.app.most_recent_version_from_available_images).strip }
|
||||||
version.presence
|
version.presence
|
||||||
end
|
end
|
||||||
|
|
||||||
def current_running_version(host: MRSK.primary_host)
|
def current_running_version(host: MRSK.primary_host)
|
||||||
version = nil
|
version = nil
|
||||||
say "Retrieve current running version...", :magenta
|
|
||||||
on(host) { version = capture_with_info(*MRSK.app.current_running_version).strip }
|
on(host) { version = capture_with_info(*MRSK.app.current_running_version).strip }
|
||||||
version.presence
|
version.presence
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user