Commit d00a614d authored by Raphael Defosseux's avatar Raphael Defosseux Committed by Robert Schmidt

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.
parent cf870d7a
...@@ -220,7 +220,6 @@ def CopyinContainerLog(ssh, lSourcePath, yaml, containerName, filename): ...@@ -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(): ...@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment