Compare commits
2 Commits
v2.0.0.rc3
...
v0.6.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e02b1ed14 | ||
|
|
fdd98622ac |
@@ -1,7 +1,7 @@
|
|||||||
PATH
|
PATH
|
||||||
remote: .
|
remote: .
|
||||||
specs:
|
specs:
|
||||||
mrsk (0.6.0)
|
mrsk (0.6.1)
|
||||||
activesupport (>= 7.0)
|
activesupport (>= 7.0)
|
||||||
dotenv (~> 2.8)
|
dotenv (~> 2.8)
|
||||||
sshkit (~> 1.21)
|
sshkit (~> 1.21)
|
||||||
|
|||||||
@@ -1,11 +1,6 @@
|
|||||||
class Mrsk::Cli::App < Mrsk::Cli::Base
|
class Mrsk::Cli::App < Mrsk::Cli::Base
|
||||||
desc "boot", "Boot app on servers (or reboot app if already running)"
|
desc "boot", "Boot app on servers (or reboot app if already running)"
|
||||||
def boot
|
def boot
|
||||||
cli = self
|
|
||||||
|
|
||||||
say "Ensure no other version of the app is running...", :magenta
|
|
||||||
stop
|
|
||||||
|
|
||||||
say "Get most recent version available as an image...", :magenta unless options[:version]
|
say "Get most recent version available as an image...", :magenta unless options[:version]
|
||||||
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
|
||||||
@@ -15,12 +10,14 @@ class Mrsk::Cli::App < Mrsk::Cli::Base
|
|||||||
execute *MRSK.auditor.record("app boot version #{version}"), verbosity: :debug
|
execute *MRSK.auditor.record("app boot version #{version}"), verbosity: :debug
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
execute *MRSK.app.stop, raise_on_non_zero_exit: false
|
||||||
execute *MRSK.app.run(role: role.name)
|
execute *MRSK.app.run(role: role.name)
|
||||||
rescue SSHKit::Command::Failed => e
|
rescue SSHKit::Command::Failed => e
|
||||||
if e.message =~ /already in use/
|
if e.message =~ /already in use/
|
||||||
error "Rebooting container with same version already deployed on #{host}"
|
error "Rebooting container with same version already deployed on #{host}"
|
||||||
|
execute *MRSK.auditor.record("app rebooted with version #{version}"), verbosity: :debug
|
||||||
|
|
||||||
cli.remove_container version
|
execute *MRSK.app.remove_container(version: version)
|
||||||
execute *MRSK.app.run(role: role.name)
|
execute *MRSK.app.run(role: role.name)
|
||||||
else
|
else
|
||||||
raise
|
raise
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
module Mrsk
|
module Mrsk
|
||||||
VERSION = "0.6.0"
|
VERSION = "0.6.1"
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user