use archiveArtifact() for BuildProxy()
This commit is contained in:
@@ -534,7 +534,7 @@ class Containerize():
|
|||||||
HTML.CreateHtmlTabFooter(False)
|
HTML.CreateHtmlTabFooter(False)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def BuildProxy(self, HTML):
|
def BuildProxy(self, ctx, HTML):
|
||||||
svr = self.eNB_serverId[self.eNB_instance]
|
svr = self.eNB_serverId[self.eNB_instance]
|
||||||
lIpAddr, lSourcePath = self.GetCredentials(svr)
|
lIpAddr, lSourcePath = self.GetCredentials(svr)
|
||||||
logging.debug('Building on server: ' + lIpAddr)
|
logging.debug('Building on server: ' + lIpAddr)
|
||||||
@@ -566,15 +566,10 @@ class Containerize():
|
|||||||
if not success:
|
if not success:
|
||||||
raise Exception("could not clone proxy repository")
|
raise Exception("could not clone proxy repository")
|
||||||
|
|
||||||
filename = f'build_log_{self.testCase_id}'
|
fullpath = f'{lSourcePath}/proxy_build.log'
|
||||||
fullpath = f'{lSourcePath}/{filename}'
|
|
||||||
|
|
||||||
ssh.run(f'docker build --target oai-lte-multi-ue-proxy --tag proxy:{tag} --file {lSourcePath}/docker/Dockerfile.ubuntu18.04 {lSourcePath} > {fullpath} 2>&1')
|
ssh.run(f'docker build --target oai-lte-multi-ue-proxy --tag proxy:{tag} --file {lSourcePath}/docker/Dockerfile.ubuntu18.04 {lSourcePath} > {fullpath} 2>&1')
|
||||||
ssh.run(f'zip -r -qq {fullpath}.zip {fullpath}')
|
archiveArtifact(ssh, ctx, fullpath)
|
||||||
local_file = f"{os.getcwd()}/../cmake_targets/log/{filename}.zip"
|
|
||||||
ssh.copyin(f'{fullpath}.zip', local_file)
|
|
||||||
# don't delete such that we might recover the zips
|
|
||||||
#ssh.run(f'rm -f {fullpath}.zip')
|
|
||||||
|
|
||||||
ssh.run('docker image prune --force')
|
ssh.run('docker image prune --force')
|
||||||
ret = ssh.run(f'docker image inspect --format=\'Size = {{{{.Size}}}} bytes\' proxy:{tag}')
|
ret = ssh.run(f'docker image inspect --format=\'Size = {{{{.Size}}}} bytes\' proxy:{tag}')
|
||||||
|
|||||||
+1
-1
@@ -140,7 +140,7 @@ def ExecuteActionWithParam(action, ctx):
|
|||||||
elif action == 'Build_Image':
|
elif action == 'Build_Image':
|
||||||
success = CONTAINERS.BuildImage(HTML)
|
success = CONTAINERS.BuildImage(HTML)
|
||||||
elif action == 'Build_Proxy':
|
elif action == 'Build_Proxy':
|
||||||
success = CONTAINERS.BuildProxy(HTML)
|
success = CONTAINERS.BuildProxy(ctx, HTML)
|
||||||
elif action == 'Build_Cluster_Image':
|
elif action == 'Build_Cluster_Image':
|
||||||
success = CLUSTER.BuildClusterImage(HTML)
|
success = CLUSTER.BuildClusterImage(HTML)
|
||||||
elif action == 'Build_Run_Tests':
|
elif action == 'Build_Run_Tests':
|
||||||
|
|||||||
Reference in New Issue
Block a user