Class: DeployJob

Inherits:
BsaSoapBase show all
Defined in:
lib/bl_soap/deploy_job.rb

Overview

very basic support right now

Constant Summary

Constants inherited from BsaSoapBase

BsaSoapBase::CLI_SERVICE, BsaSoapBase::CLI_WSDL, BsaSoapBase::DEFAULT_AUTH_TYPE, BsaSoapBase::HTTP_READ_TIMEOUT, BsaSoapBase::LOGIN_SERVICE, BsaSoapBase::LOGIN_WSDL, BsaSoapBase::ROLE_SERVICE, BsaSoapBase::ROLE_WSDL

Instance Method Summary collapse

Methods inherited from BsaSoapBase

#execute_cli_with_attachments, #execute_cli_with_param_list, #get_all_servers, #get_cli_return_value, #initialize, #validate_cli_option_hash_string_values, #validate_cli_options_hash, #validate_cli_result, #validate_servers

Constructor Details

This class inherits a constructor from BsaSoapBase

Instance Method Details

#clear_deploy_job_schedules_by_dbkey(options = {}) ⇒ Object



95
96
97
98
99
100
101
102
103
104
# File 'lib/bl_soap/deploy_job.rb', line 95

def clear_deploy_job_schedules_by_dbkey(options = {})
  validate_cli_options_hash([:job_run_key], options)
  void_result = execute_cli_with_param_list(self.class, "clearDeployJobSchedulesByDBKey",
                                            [
                                                options[:job_run_key],
                                            ])
  void_value = get_cli_return_value(void_result)
rescue => exception
  raise "#{self.class} Exception: #{exception.to_s}"
end

#create_deploy_job(options = {}) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/bl_soap/deploy_job.rb', line 3

def create_deploy_job(options = {})
  validate_cli_options_hash([:job_name, :group_id, :package_db_key, :server_name], options)
  db_key_result = execute_cli_with_param_list(self.class, "createDeployJob",
                                              [
                                                  options[:job_name],
                                                  options[:group_id],
                                                  options[:package_db_key],
                                                  options[:server_name],
                                                  true, #isSimulateEnabled
                                                  true, #isCommitEnabled
                                                  false, #isStagedIndirect
                                              ])
  db_key = get_cli_return_value(db_key_result)
rescue => exception
  raise "Exception executing #{self.class} function: #{exception.to_s}"
end

#create_deploy_job_advanced(options = {}) ⇒ Object



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/bl_soap/deploy_job.rb', line 36

def create_deploy_job_advanced(options = {})
  validate_cli_options_hash([:job_name, :group_id, :package_db_key, :server_name], options)
  db_key_result = execute_cli_with_param_list(self.class, "createDeployJob",
                                              [
                                                  options[:job_name],
                                                  options[:group_id],
                                                  options[:package_db_key],
                                                  1,                              #deployType (0 = BASIC, 1 = ADVANCED)
                                                  options[:server_name],
                                                  true,                           #isSimulateEnabled
                                                  true,                           #isCommitEnabled
                                                  false,                          #isStagedIndirect
                                                  2,                              #logLevel (0 = ERRORS, 1 = ERRORS_AND_WARNINGS, 2 = ALL_INFO)
                                                  true,                           #isExecuteByPhase
                                                  false,                          #isResetOnFailure
                                                  true,                           #isRollbackAllowed
                                                  false,                          #isRollbackOnFailure
                                                  true,                           #isRebootIfRequired
                                                  true,                           #isCopyLockedFilesAfterReboot
                                                  true,                           #isStagingAfterSimulate
                                                  true                            #isCommitAfterStaging
                                              ])
  db_key = get_cli_return_value(db_key_result)
rescue => exception
  raise "Exception executing #{self.class} function: #{exception.to_s}"
end

#create_deploy_job_without_target(options = {}) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'lib/bl_soap/deploy_job.rb', line 20

def create_deploy_job_without_target(options = {})
  validate_cli_options_hash([:job_name, :group_id, :package_db_key], options)
  db_key_result = execute_cli_with_param_list(self.class, "createDeployJobWithoutTarget",
                                              [
                                                  options[:job_name],
                                                  options[:group_id],
                                                  options[:package_db_key],
                                                  true, #isSimulateEnabled
                                                  true, #isCommitEnabled
                                                  false, #isStagedIndirect
                                              ])
  db_key = get_cli_return_value(db_key_result)
rescue => exception
  raise "Exception executing #{self.class} function: #{exception.to_s}"
end

#get_dbkey_by_group_and_name(options = {}) ⇒ Object



66
67
68
69
70
71
72
73
74
75
76
# File 'lib/bl_soap/deploy_job.rb', line 66

def get_dbkey_by_group_and_name(options = {})
  validate_cli_options_hash([:group_name, :job_name], options)
  db_key_result = execute_cli_with_param_list(self.class, "getDBKeyByGroupAndName",
                                              [
                                                  options[:group_name], # Fully qualified path to the job group containing the job
                                                  options[:job_name]    # Name of the job
                                              ])
  db_key = get_cli_return_value(db_key_result)
rescue => exception
  raise "Exception executing #{self.class} function: #{exception.to_s}"
end

#set_phase_schedule_by_dbkey(options = {}) ⇒ Object



78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'lib/bl_soap/deploy_job.rb', line 78

def set_phase_schedule_by_dbkey(options = {})
  validate_cli_options_hash([:job_run_key], options)
  void_result = execute_cli_with_param_list(self.class, "setAdvanceDeployJobPhaseScheduleByDBKey",
                                            [
                                                options[:job_run_key],
                                                options[:simulate_type],
                                                options[:simulate_date],
                                                options[:stage_type],
                                                options[:stage_date],
                                                options[:commit_type],
                                                options[:commit_date],
                                            ])
  void_value = get_cli_return_value(void_result)
rescue => exception
  raise "#{self.class} Exception: #{exception.to_s}"
end