in templater/jobs/utils/utils.go [48:62]
func GetJobsByType(repos []string, jobType string) (map[string]map[string]types.JobConfig, error) {
jobsListByType := map[string]map[string]types.JobConfig{}
for _, repo := range repos {
jobDir := filepath.Join("jobs", jobType, repo)
jobList, err := UnmarshalJobs(jobDir)
if err != nil {
return nil, fmt.Errorf("error reading job directory %s: %v", jobDir, err)
}
jobsListByType[fmt.Sprintf("aws/%s", repo)] = jobList
}
return jobsListByType, nil
}