Data-Test-Executer Framework speziell zum Test von Datenverarbeitungen mit Datengenerierung, Systemvorbereitungen, Einspielungen, ganzheitlicher diversifizierender Vergleich
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

36 lines
1.2 KiB

# ---------------------------------------
# functions for managing diverse repositories
# namescheme:
# server/project_element.git
# project_element_server/.git
import os
import tools.config_tool
import basic.constants as B
import tools.path_const as P
import tools.data_const as D
def createWorkspaces(job: any, project=""):
projects = tools.config_tool.getConfig(job, P.KEY_BASIC, B.SUBJECT_PROJECTS, ttype=D.CSV_SPECTYPE_KEYS)
servers = tools.config_tool.getConfig(job, P.KEY_BASIC, "servers", ttype=D.CSV_SPECTYPE_KEYS)
repositories = tools.config_tool.getConfig(job, P.KEY_BASIC, "repositories", ttype=D.CSV_SPECTYPE_KEYS)
home = job.conf[B.TOPIC_PATH][B.ATTR_PATH_HOME]
pp = []
if project == "":
for p in projects[B.SUBJECT_PROJECTS]:
pp.append(projects[B.SUBJECT_PROJECTS][p]["short"])
else:
pp.append(project)
sp = str(os.path.sep)
a = home.split(sp)
while a[-1] != "workspace":
a.pop()
print(str(a))
workroot = sp.join(a)
print(str(servers))
for s in servers["servers"]:
print("s: "+str(servers["servers"][s]))
for p in pp:
workpath = os.path.join(workroot, p+"_workspace_"+servers["servers"][s]["name"])
print(workpath)