@@ -474,22 +474,21 @@ def adjust_build_steps(index):
474474 codefresh_dir = dirname (codefresh_abs_path )
475475 if not exists (codefresh_dir ):
476476 os .makedirs (codefresh_dir )
477- from ruamel .yaml import YAML
478477 from ruamel .yaml .scalarstring import SingleQuotedScalarString
479478
480- def _quote_values (data ):
481- if isinstance (data , dict ):
482- return {k : _quote_values (v ) for k , v in data .items ()}
483- elif isinstance (data , list ):
484- return [_quote_values (item ) for item in data ]
485- elif isinstance (data , str ):
486- return SingleQuotedScalarString (data )
487- return data
479+ deployment_step = codefresh .get ("steps" , {}).get ("deployment" , {})
480+ arguments = deployment_step .get ("arguments" , {})
481+ if "custom_values" in arguments :
482+ arguments ["custom_values" ] = [
483+ SingleQuotedScalarString (v ) if isinstance (v , str ) else v
484+ for v in arguments ["custom_values" ]
485+ ]
488486
487+ from ruamel .yaml import YAML
489488 ryaml = YAML ()
490489 ryaml .default_flow_style = False
491490 with open (codefresh_abs_path , 'w' ) as f :
492- ryaml .dump (_quote_values ( codefresh ) , f )
491+ ryaml .dump (codefresh , f )
493492 return codefresh
494493
495494
0 commit comments