Skip to content

Commit 9c00ca6

Browse files
author
Power Cloud Robot
authored
Merge pull request #55 from KeerthanaAP/all_jobs
Added support to get all CIs JobHistory
2 parents 2422cd8 + a1d0551 commit 9c00ca6

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

CI_JobHistory.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,9 @@ def display_ci_links(config_data):
168168
j=j+1
169169
ci_name_list.append(ci_name)
170170
print(j,'',ci_name)
171+
j=j+1
172+
print(j, " All")
173+
171174

172175
option = input("Select the required ci's serial number with a space ")
173176

@@ -179,8 +182,11 @@ def display_ci_links(config_data):
179182
ci_to_int = int(ci)
180183
if 0 < ci_to_int <= len(config_data):
181184
options_int_list.append(ci_to_int)
185+
elif ci_to_int == len(config_data) + 1:
186+
for j in range (1, len(config_data)+1):
187+
options_int_list.append(j)
182188
else:
183-
return_value = "Enter the options in range of 1 to " + str(len(config_data))
189+
return_value = "Enter the options in range of 1 to " + str(len(config_data)+1)
184190
print(return_value)
185191
return "ERROR"
186192
except ValueError:
@@ -189,9 +195,13 @@ def display_ci_links(config_data):
189195
for ci_name in config_data.keys():
190196
j=j+1
191197
ci_name_list.append(ci_name)
198+
192199

193200
selected_ci = config_vars.get('Settings', 'selected_ci')
194201
options_int_list = [int(value) for value in selected_ci.split(',')]
202+
if len(ci_name_list)+1 in options_int_list:
203+
options_int_list = [x for x in range(1, len(ci_name_list)+1)]
204+
195205

196206
for i in options_int_list:
197207
config_temp_data = {ci_name_list[i-1]: config_data[ci_name_list[i-1]]}

0 commit comments

Comments
 (0)