@@ -158,6 +158,20 @@ def generate_config():
158158 if client_name in MINIMAL_VARIANTS :
159159 process_branch (client_name , alt_repo , branch_spec , f"{ prefix } -{ safe_branch_name } -minimal" , config_list )
160160
161+ # Process custom configurations if they exist
162+ if 'custom_configs' in client_config :
163+ for custom_config in client_config ['custom_configs' ]:
164+ # Extract required fields
165+ name = custom_config ['name' ]
166+ ref = custom_config ['ref' ]
167+ tag = custom_config ['tag' ]
168+
169+ # Optional source_patch field
170+ source_patch = custom_config .get ('source_patch' )
171+
172+ # Use default repository for custom configs
173+ process_branch_custom (client_name , default_repo , ref , tag , config_list , source_patch )
174+
161175 # Sort configs by client name for better readability
162176 config_list .sort (key = lambda x : extract_client_name (x ))
163177
@@ -316,6 +330,38 @@ def process_branch(client_name, source_repo, branch, target_tag, config_list):
316330
317331 config_list .append (config )
318332
333+ def process_branch_custom (client_name , source_repo , branch , target_tag , config_list , source_patch = None ):
334+ """Process a single custom branch configuration with optional patch"""
335+ # Create the basic configuration
336+ config = {
337+ 'source' : {
338+ 'repository' : source_repo ,
339+ 'ref' : branch
340+ },
341+ 'target' : {
342+ 'tag' : target_tag ,
343+ 'repository' : f'ethpandaops/{ client_name } '
344+ }
345+ }
346+
347+ # Add source patch if specified
348+ if source_patch :
349+ config ['source' ]['patch' ] = source_patch
350+
351+ # Add dockerfile if one exists for this client
352+ dockerfile_path = get_dockerfile_path (client_name , target_tag )
353+ if dockerfile_path :
354+ config ['target' ]['dockerfile' ] = dockerfile_path
355+ # Add build script if one exists for this client/branch combination
356+ build_script = get_build_script (client_name , branch , target_tag )
357+ if build_script :
358+ config ['build_script' ] = build_script
359+ # Add build args if needed
360+ build_args = get_build_args (client_name , source_repo , branch , target_tag )
361+ if build_args :
362+ config ['build_args' ] = build_args
363+ config_list .append (config )
364+
319365if __name__ == '__main__' :
320366 if not os .path .exists ('branches.yaml' ):
321367 print ("Error: branches.yaml not found. Please create it first." )
0 commit comments