@@ -190,11 +190,33 @@ def _parse_checkout_node(self, origin, checkout_node):
190
190
}
191
191
}]
192
192
193
+ def _get_input_files (self , artifacts : dict , exclude_properties = None ):
194
+ input_files = []
195
+ for name , url in artifacts .items ():
196
+ if exclude_properties and name in exclude_properties :
197
+ continue
198
+ if not "input_" in name :
199
+ # Skip output files
200
+ continue
201
+ # Replace "/" with "_" to match with the allowed pattern
202
+ # for "name" property of "input_files" i.e. '^[^/]+$'
203
+ name = name .replace ("/" , "_" )
204
+ input_files .append (
205
+ {
206
+ 'name' : name ,
207
+ 'url' : url
208
+ }
209
+ )
210
+ return input_files
211
+
193
212
def _get_output_files (self , artifacts : dict , exclude_properties = None ):
194
213
output_files = []
195
214
for name , url in artifacts .items ():
196
215
if exclude_properties and name in exclude_properties :
197
216
continue
217
+ if "input_" in name :
218
+ # Skip input files
219
+ continue
198
220
# Replace "/" with "_" to match with the allowed pattern
199
221
# for "name" property of "output_files" i.e. '^[^/]+$'
200
222
name = name .replace ("/" , "_" )
@@ -312,7 +334,10 @@ def _parse_build_node(self, origin, node):
312
334
artifacts = artifacts ,
313
335
exclude_properties = ('build_log' , '_config' )
314
336
)
315
- parsed_build_node ['input_files' ] = None
337
+ parsed_build_node ['input_files' ] = self ._get_input_files (
338
+ artifacts = artifacts ,
339
+ exclude_properties = None
340
+ )
316
341
parsed_build_node ['config_url' ] = artifacts .get ('_config' )
317
342
parsed_build_node ['log_url' ] = artifacts .get ('build_log' )
318
343
log_url = parsed_build_node ['log_url' ]
@@ -537,11 +562,14 @@ def _parse_test_node(self, origin, test_node):
537
562
538
563
artifacts = self ._get_artifacts (test_node )
539
564
if artifacts :
565
+ parsed_test_node ['input_files' ] = self ._get_input_files (
566
+ artifacts = artifacts ,
567
+ exclude_properties = None
568
+ )
540
569
parsed_test_node ['output_files' ] = self ._get_output_files (
541
570
artifacts = artifacts ,
542
571
exclude_properties = ('lava_log' , 'test_log' )
543
572
)
544
- parsed_test_node ['input_files' ] = None
545
573
if artifacts .get ('lava_log' ):
546
574
parsed_test_node ['log_url' ] = artifacts .get ('lava_log' )
547
575
else :
0 commit comments