CI move log folder creation right away at deployment time
Some commands might use that folder before Ping/Iperf, in which it has been created.
This commit is contained in:
committed by
Robert Schmidt
parent
cf870d7ae9
commit
d00a614d4e
@@ -220,7 +220,6 @@ def CopyinContainerLog(ssh, lSourcePath, yaml, containerName, filename):
|
|||||||
remote_filename = f"{lSourcePath}/cmake_targets/log/{filename}"
|
remote_filename = f"{lSourcePath}/cmake_targets/log/{filename}"
|
||||||
ssh.run(f'docker logs {containerName} &> {remote_filename}')
|
ssh.run(f'docker logs {containerName} &> {remote_filename}')
|
||||||
local_dir = f"{os.getcwd()}/../cmake_targets/log/{yaml}"
|
local_dir = f"{os.getcwd()}/../cmake_targets/log/{yaml}"
|
||||||
os.system(f'mkdir -p {local_dir}')
|
|
||||||
local_filename = f"{local_dir}/{filename}"
|
local_filename = f"{local_dir}/{filename}"
|
||||||
return ssh.copyin(remote_filename, local_filename)
|
return ssh.copyin(remote_filename, local_filename)
|
||||||
|
|
||||||
@@ -844,6 +843,9 @@ class Containerize():
|
|||||||
lIpAddr, lSourcePath = self.GetCredentials(svr)
|
lIpAddr, lSourcePath = self.GetCredentials(svr)
|
||||||
logging.debug('\u001B[1m Deploying OAI Object on server: ' + lIpAddr + '\u001B[0m')
|
logging.debug('\u001B[1m Deploying OAI Object on server: ' + lIpAddr + '\u001B[0m')
|
||||||
yaml = self.yamlPath[self.eNB_instance].strip('/')
|
yaml = self.yamlPath[self.eNB_instance].strip('/')
|
||||||
|
# creating the log folder by default
|
||||||
|
local_dir = f"{os.getcwd()}/../cmake_targets/log/{yaml.split('/')[-1]}"
|
||||||
|
os.system(f'mkdir -p {local_dir}')
|
||||||
wd = f'{lSourcePath}/{yaml}'
|
wd = f'{lSourcePath}/{yaml}'
|
||||||
|
|
||||||
with cls_cmd.getConnection(lIpAddr) as ssh:
|
with cls_cmd.getConnection(lIpAddr) as ssh:
|
||||||
|
|||||||
Reference in New Issue
Block a user