func AddPythonVersion()

in templater/jobs/utils/utils.go [110:126]


func AddPythonVersion(fileName string, data map[string]interface{}) map[string]map[string]interface{} {
	jobList := map[string]map[string]interface{}{}
	if !strings.Contains(fileName, "python-3-X") {
		return jobList
	}

	for _, version := range pythonVersions {
		pythonVersionFileName := strings.ReplaceAll(fileName, "python-3-X", "python-"+version)
		pythonVersion := strings.Replace(version, "-", ".", 1)
		jobList[pythonVersionFileName] = AppendMap(data, map[string]interface{}{
			"jobPythonVersion": version,
			"pythonVersion":    pythonVersion,
		})
	}

	return jobList
}