brpm_module_bladelogic 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/automations/deploy_package.meta +2 -2
- data/automations/deploy_package.rb +25 -16
- data/config.yml +1 -1
- data/lib/bl_soap/deploy_job.rb +11 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Njg2N2QwY2I2MjM0ZWNjMGM2NjNlZDYyMWYwOGQ1MTEzOGM0NTA3Mg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NGM0ZjZkMzkzODIxZDI5YTJjZDY1MjIxMDA1Y2NiNDU3NGU4YjgyNw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YWE0OWZlZTM0OTc1Zjg0NjQyYzY3NWFmOWVjOTJjN2M2MzhlZGI2MmU3ODZj
|
10
|
+
ZTA5ZGZjMTFhNGE4YjRmMzE5NTIyZTZjMjNiYzI5MmFiOTA0MDkzOTJkMjY1
|
11
|
+
MDBhZGU5NWNjNTFhNDMyMjk4MWI5NTZkZGUzYjMzNzZkOWY0YzU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YmEzYzk4ZGMyM2FkZmU1YzNiZjBlNzYzYzdjZTBkZmRlMDE4YWQ2NTUxOWZl
|
14
|
+
MjE5ZTc2NjUzMmM5NThiYmU4N2RjMTk1NjE4MjhmMjdmMTY4ZjE2MzM0ZDVj
|
15
|
+
MjRiNGRkYjhjYTRhODg2ZGIwYjdhYjFhN2I4NDVlNmZmYmUyZjA=
|
@@ -22,8 +22,8 @@ params:
|
|
22
22
|
deploy_options:
|
23
23
|
name: Deploy options
|
24
24
|
type: in-list-single
|
25
|
-
list_pairs: 0,
|
26
|
-
position: A7:
|
25
|
+
list_pairs: 0,Full deployment|1,Only upload package|2,Only execute package
|
26
|
+
position: A7:C7
|
27
27
|
job_status:
|
28
28
|
name: Job Status
|
29
29
|
type: out-text
|
@@ -21,6 +21,11 @@ if params["deploy_options"] == "Only execute package"
|
|
21
21
|
deploy_job_name = bsa_soap_client.job.get_job_name_by_db_key({:job_db_key => job_db_key})
|
22
22
|
deploy_job_group_path_id = bsa_soap_client.job.get_group_id({:job_key => job_db_key})
|
23
23
|
deploy_job_group_path = bsa_soap_client.group.get_a_qualified_group_name({:group_type => 5005, :group_id => deploy_job_group_path_id})
|
24
|
+
|
25
|
+
BrpmAuto.log("Executing the Deploy job...")
|
26
|
+
job_run_key = bsa_soap_client.job.execute_job_and_wait({:job_key => job_db_key})
|
27
|
+
BrpmAuto.log("Job run key is #{job_run_key}.")
|
28
|
+
|
24
29
|
else
|
25
30
|
target_type = BrpmAuto.first_defined(BrpmAuto.substitute_tokens(params["target_type"]), "Server group")
|
26
31
|
BrpmAuto.log "Target type: #{params["target_type"]}"
|
@@ -97,9 +102,8 @@ else
|
|
97
102
|
end
|
98
103
|
|
99
104
|
if params["deploy_options"] == "Only upload package"
|
100
|
-
|
101
|
-
|
102
|
-
BrpmAuto.log("Setting the phase schedule of the Deploy job to only execute the stage phase, starting in #{wait_time} seconds (at #{start_time.strftime("%Y-%m-%d %H:%M:%S")})...")
|
105
|
+
start_time = Time.now - 60 * 60 * 2
|
106
|
+
BrpmAuto.log("Setting the phase schedule of the Deploy job to only execute the stage phase...")
|
103
107
|
job_db_key = bsa_soap_client.deploy_job.set_phase_schedule_by_dbkey({:job_run_key => job_db_key,
|
104
108
|
:simulate_type => "AtTime",
|
105
109
|
:simulate_date => start_time.strftime("%Y-%m-%d %H:%M:%S"),
|
@@ -108,22 +112,27 @@ else
|
|
108
112
|
:commit_type => "NotScheduled",
|
109
113
|
:commit_date => ""})
|
110
114
|
|
115
|
+
sleep(10)
|
116
|
+
job_run_key = bsa_soap_client.job_run.find_last_run_key_by_job_key({:job_key => job_db_key})
|
117
|
+
|
118
|
+
BrpmAuto.log("Polling the Deploy job until it is finished...")
|
119
|
+
begin
|
120
|
+
sleep(10)
|
121
|
+
is_still_running = bsa_soap_client.job_run.get_job_run_is_running_by_run_key({:job_run_key => job_run_key})
|
122
|
+
end while is_still_running
|
123
|
+
BrpmAuto.log("The Deploy job has finished.")
|
124
|
+
|
125
|
+
BrpmAuto.log("Clearing the phase schedule of the Deploy job to enable the commit phase...")
|
126
|
+
job_db_key = bsa_soap_client.deploy_job.clear_deploy_job_schedules_by_dbkey({:job_run_key => job_db_key})
|
127
|
+
|
111
128
|
BrpmAuto.log "Storing the Deploy job db key to the request params so it can be used later to execute the package (right now we are only going to upload the package to the target servers)."
|
112
129
|
BrpmAuto.request_params["#{params.component}_deploy_job_db_key"] = job_db_key
|
113
|
-
end
|
114
|
-
end
|
115
130
|
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
BrpmAuto.log("Polling the Deploy job until it is finished...")
|
122
|
-
begin
|
123
|
-
sleep(wait_time)
|
124
|
-
is_still_running = bsa_soap_client.job_run.get_job_run_is_running_by_run_key({:job_run_key => job_run_key})
|
125
|
-
end while is_still_running
|
126
|
-
BrpmAuto.log("The Deploy job has finished.")
|
131
|
+
else
|
132
|
+
BrpmAuto.log("Executing the Deploy job...")
|
133
|
+
job_run_key = bsa_soap_client.job.execute_job_and_wait({:job_key => job_db_key})
|
134
|
+
BrpmAuto.log("Job run key is #{job_run_key}.")
|
135
|
+
end
|
127
136
|
end
|
128
137
|
|
129
138
|
BrpmAuto.log("Checking if the job finished successfully...")
|
data/config.yml
CHANGED
data/lib/bl_soap/deploy_job.rb
CHANGED
@@ -91,4 +91,15 @@ class DeployJob < BsaSoapBase
|
|
91
91
|
rescue => exception
|
92
92
|
raise "#{self.class} Exception: #{exception.to_s}"
|
93
93
|
end
|
94
|
+
|
95
|
+
def clear_deploy_job_schedules_by_dbkey(options = {})
|
96
|
+
validate_cli_options_hash([:job_run_key], options)
|
97
|
+
void_result = execute_cli_with_param_list(self.class, "clearDeployJobSchedulesByDBKey",
|
98
|
+
[
|
99
|
+
options[:job_run_key],
|
100
|
+
])
|
101
|
+
void_value = get_cli_return_value(void_result)
|
102
|
+
rescue => exception
|
103
|
+
raise "#{self.class} Exception: #{exception.to_s}"
|
104
|
+
end
|
94
105
|
end
|