module RatDeployer::Commands::Deploy
This command runs `compose pull` and `compose up -d` for the given services. Adittionally, notifies to slack if configured to do so.
Public Class Methods
deploy(*services)
click to toggle source
# File lib/rat_deployer/commands/deploy.rb, line 29 def self.deploy(*services) if services.any? services_str = services.join(' ') Compose.perform("pull #{services_str}") Compose.perform("up -d --no-deps --force-recreate #{services_str}") else Compose.perform('pull') Compose.perform('up -d') end end
perform(*services)
click to toggle source
# File lib/rat_deployer/commands/deploy.rb, line 16 def self.perform(*services) Notifier.notify_deploy_start deploy(*services) Notifier.notify_deploy_end rescue StandardError => e Notifier.notify <<-STR.strip_heredoc Failed deploy on #{Config.env} Reason: #{e.message} STR raise e end