@@ -499,6 +499,9 @@ def create_var(var):
499499 # CI Variables
500500 if "variables" in group_dict or "variables_from_files" in group_dict :
501501
502+ if "variables" not in group_dict :
503+ group_dict ["variables" ] = []
504+
502505 logger .info ("Found group yaml definition for vars: {variables}" .format (variables = group_dict ["variables" ]))
503506
504507 # Always clean all vars before set
@@ -535,6 +538,9 @@ def create_var(var):
535538 # CI Variables
536539 if ("variables" in project_dict or "variables_from_files" in project_dict ) and not ("jobs_enabled" in project_dict and project_dict ["jobs_enabled" ] is False ):
537540
541+ if "variables" not in project_dict :
542+ project_dict ["variables" ] = []
543+
538544 logger .info ("Found project yaml definition for vars: {variables}" .format (variables = project_dict ["variables" ]))
539545
540546 # Always clean all vars before set
@@ -639,6 +645,9 @@ def create_var(var):
639645 # CI Variables
640646 if "variables" in group_dict or "variables_from_files" in group_dict :
641647
648+ if "variables" not in group_dict :
649+ group_dict ["variables" ] = []
650+
642651 # Check variables_clean_all_before_set
643652 if args .variables_clean_all_before_set or ("variables_clean_all_before_set" in group_dict and group_dict ["variables_clean_all_before_set" ]):
644653 variables_clean_all_before_set = True
@@ -1156,6 +1165,9 @@ def create_var(var):
11561165 # CI Variables
11571166 if ("variables" in project_dict or "variables_from_files" in project_dict ) and not ("jobs_enabled" in project_dict and project_dict ["jobs_enabled" ] is False ):
11581167
1168+ if "variables" not in project_dict :
1169+ project_dict ["variables" ] = []
1170+
11591171 # Check variables_clean_all_before_set
11601172 if args .variables_clean_all_before_set or ("variables_clean_all_before_set" in project_dict and project_dict ["variables_clean_all_before_set" ]):
11611173 variables_clean_all_before_set = True
0 commit comments