Ruby 3.2.0 compatibility
This commit is contained in:
@@ -41,7 +41,7 @@ GEM
|
||||
net-scp (4.0.0)
|
||||
net-ssh (>= 2.6.5, < 8.0.0)
|
||||
net-ssh (7.0.1)
|
||||
nokogiri (1.13.10-arm64-darwin)
|
||||
nokogiri (1.14.0.rc1-arm64-darwin)
|
||||
racc (~> 1.4)
|
||||
racc (1.6.2)
|
||||
rack (2.2.5)
|
||||
|
||||
@@ -33,6 +33,24 @@ namespace :mrsk do
|
||||
end
|
||||
end
|
||||
|
||||
desc "Run app on servers (or start them if they've already been run)"
|
||||
task :run do
|
||||
MRSK_CONFIG.roles.each do |role|
|
||||
on(MRSK_CONFIG.servers(role: role)) do |host|
|
||||
begin
|
||||
execute *app.run(role: role)
|
||||
rescue SSHKit::Command::Failed => e
|
||||
if e.message =~ /already in use/
|
||||
puts "Container with same version already deployed on #{host}, starting that instead"
|
||||
execute *app.start, host: host
|
||||
else
|
||||
raise
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
desc "Start existing app on servers"
|
||||
task :start do
|
||||
on(MRSK_CONFIG.servers) { execute *app.start, raise_on_non_zero_exit: false }
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
require "bundler/setup"
|
||||
require "active_support/test_case"
|
||||
require "active_support/testing/autorun"
|
||||
require "debug"
|
||||
|
||||
ActiveSupport::LogSubscriber.logger = ActiveSupport::Logger.new(STDOUT) if ENV["VERBOSE"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user