Sha256: c7d15c75803314e8228793ec55781d6c0090218c129bb26f8322012ee8965392
Contents?: true
Size: 687 Bytes
Versions: 1
Compression:
Stored size: 687 Bytes
Contents
# Capistrano plugin hook to set default values namespace :load do task :defaults do set :check_status_roles, fetch(:check_status_roles, [:web]) set :check_status_path, fetch(:check_status_path, '/status/all') end end desc 'Run status checks' task :check_status do on roles fetch(:check_status_roles), in: :sequence do |host| status_url = "https://#{host}#{fetch(:check_status_path)}" info "Checking status at #{status_url}" status_body = capture("curl #{status_url}") if status_body.match?(/FAILED/) error status_body.lines.grep(/FAILED/).join else info SSHKit::Color.new($stdout).colorize('All checks passed!', :green) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dlss-capistrano-4.1.0 | lib/dlss/capistrano/tasks/check_status.rake |