Class: Services::Deploy

Inherits:
Object
  • Object
show all
Defined in:
lib/busbar_cli/services/deploy.rb

Class Method Summary collapse

Class Method Details

.call(app_id, environment_name, branch) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/busbar_cli/services/deploy.rb', line 3

def self.call(app_id, environment_name, branch)
  Printer.print_result(
    result: DeploymentsRepository.create(
      app_id,
      environment_name,
      branch: branch,
      build: true
    ),
    success_message: 'Deployment scheduled',
    failure_message: 'Error while deploying the environment. ' \
                     'Please check its existence (and of its app)'
  )
end