Commit 4f466223 authored by Raphael Defosseux's avatar Raphael Defosseux

fix(ci): forgot to add HTML rows to test-report

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 6da8869e
...@@ -652,6 +652,8 @@ class Containerize(): ...@@ -652,6 +652,8 @@ class Containerize():
mySSH.command('echo oaicicd | docker login --password-stdin -u oaicicd porcepix.sboai.cs.eurecom.fr', '\$', 5) mySSH.command('echo oaicicd | docker login --password-stdin -u oaicicd porcepix.sboai.cs.eurecom.fr', '\$', 5)
if re.search('Login Succeeded', mySSH.getBefore()) is None: if re.search('Login Succeeded', mySSH.getBefore()) is None:
logging.error('Could not log into local registry') logging.error('Could not log into local registry')
mySSH.close()
HTML.CreateHtmlTestRow('Could not log into local registry', 'KO', CONST.ALL_PROCESSES_OK)
return False return False
orgTag = 'develop' orgTag = 'develop'
...@@ -665,15 +667,20 @@ class Containerize(): ...@@ -665,15 +667,20 @@ class Containerize():
if re.search(': digest:', mySSH.getBefore()) is None: if re.search(': digest:', mySSH.getBefore()) is None:
logging.debug(mySSH.getBefore()) logging.debug(mySSH.getBefore())
logging.error(f'Could not push {image} to local registry : {tagToUse}') logging.error(f'Could not push {image} to local registry : {tagToUse}')
mySSH.close()
HTML.CreateHtmlTestRow(f'Could not push {image} to local registry : {tagToUse}', 'KO', CONST.ALL_PROCESSES_OK)
return False return False
mySSH.command(f'docker rmi {tagToUse}', '\$', 5) mySSH.command(f'docker rmi {tagToUse}', '\$', 5)
mySSH.command('docker logout porcepix.sboai.cs.eurecom.fr', '\$', 5) mySSH.command('docker logout porcepix.sboai.cs.eurecom.fr', '\$', 5)
if re.search('Removing login credentials', mySSH.getBefore()) is None: if re.search('Removing login credentials', mySSH.getBefore()) is None:
logging.error('Could not log off from local registry') logging.error('Could not log off from local registry')
mySSH.close()
HTML.CreateHtmlTestRow('Could not log off from local registry', 'KO', CONST.ALL_PROCESSES_OK)
return False return False
mySSH.close() mySSH.close()
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
return True return True
def Pull_Image_from_Local_Registry(self, HTML): def Pull_Image_from_Local_Registry(self, HTML):
...@@ -702,6 +709,8 @@ class Containerize(): ...@@ -702,6 +709,8 @@ class Containerize():
mySSH.command('echo oaicicd | docker login --password-stdin -u oaicicd porcepix.sboai.cs.eurecom.fr', '\$', 5) mySSH.command('echo oaicicd | docker login --password-stdin -u oaicicd porcepix.sboai.cs.eurecom.fr', '\$', 5)
if re.search('Login Succeeded', mySSH.getBefore()) is None: if re.search('Login Succeeded', mySSH.getBefore()) is None:
logging.error('Could not log into local registry') logging.error('Could not log into local registry')
mySSH.close()
HTML.CreateHtmlTestRow('Could not log into local registry', 'KO', CONST.ALL_PROCESSES_OK)
return False return False
orgTag = 'develop' orgTag = 'develop'
...@@ -714,14 +723,19 @@ class Containerize(): ...@@ -714,14 +723,19 @@ class Containerize():
if re.search('Status: Downloaded newer image for |Status: Image is up to date for', mySSH.getBefore()) is None: if re.search('Status: Downloaded newer image for |Status: Image is up to date for', mySSH.getBefore()) is None:
logging.debug(mySSH.getBefore()) logging.debug(mySSH.getBefore())
logging.error(f'Could not pull {image} from local registry : {tagToUse}') logging.error(f'Could not pull {image} from local registry : {tagToUse}')
mySSH.close()
HTML.CreateHtmlTestRow(f'Could not pull {image} from local registry : {tagToUse}', 'KO', CONST.ALL_PROCESSES_OK)
return False return False
mySSH.command('docker logout porcepix.sboai.cs.eurecom.fr', '\$', 5) mySSH.command('docker logout porcepix.sboai.cs.eurecom.fr', '\$', 5)
if re.search('Removing login credentials', mySSH.getBefore()) is None: if re.search('Removing login credentials', mySSH.getBefore()) is None:
logging.error('Could not log off from local registry') logging.error('Could not log off from local registry')
mySSH.close()
HTML.CreateHtmlTestRow('Could not log off from local registry', 'KO', CONST.ALL_PROCESSES_OK)
return False return False
mySSH.close() mySSH.close()
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
return True return True
def Clean_Test_Server_Images(self, HTML): def Clean_Test_Server_Images(self, HTML):
...@@ -757,6 +771,7 @@ class Containerize(): ...@@ -757,6 +771,7 @@ class Containerize():
mySSH.command(f'docker rmi {tagToUse} || true', '\$', 5) mySSH.command(f'docker rmi {tagToUse} || true', '\$', 5)
mySSH.close() mySSH.close()
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
return True return True
def DeployObject(self, HTML, EPC): def DeployObject(self, HTML, EPC):
......
...@@ -1015,14 +1015,14 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re ...@@ -1015,14 +1015,14 @@ elif re.match('^TesteNB$', mode, re.IGNORECASE) or re.match('^TestUE$', mode, re
HTML.testStabilityPointReached = True HTML.testStabilityPointReached = True
CiTestObj.FailReportCnt += 1 CiTestObj.FailReportCnt += 1
if CiTestObj.FailReportCnt == CiTestObj.repeatCounts[0] and RAN.prematureExit: if CiTestObj.FailReportCnt == CiTestObj.repeatCounts[0] and RAN.prematureExit:
logging.error('Scenario failed ' + str(CiTestObj.FailReportCnt) + ' time(s)') logging.error('\u001B[1;37;41mScenario failed ' + str(CiTestObj.FailReportCnt) + ' time(s)\u001B[0m')
HTML.CreateHtmlTabFooter(False) HTML.CreateHtmlTabFooter(False)
if CiTestObj.testUnstable and (CiTestObj.testStabilityPointReached or CiTestObj.testMinStableId == '999999'): if CiTestObj.testUnstable and (CiTestObj.testStabilityPointReached or CiTestObj.testMinStableId == '999999'):
logging.warning('Scenario has reached minimal stability point -- Not a Failure') logging.warning('\u001B[1;30;43mScenario has reached minimal stability point -- Not a Failure\u001B[0m')
else: else:
sys.exit('Failed Scenario') sys.exit('Failed Scenario')
else: else:
logging.info('Scenario passed after ' + str(CiTestObj.FailReportCnt) + ' time(s)') logging.info('\u001B[1;37;42mScenario passed after ' + str(CiTestObj.FailReportCnt) + ' time(s)\u001B[0m')
HTML.CreateHtmlTabFooter(True) HTML.CreateHtmlTabFooter(True)
elif re.match('^LoadParams$', mode, re.IGNORECASE): elif re.match('^LoadParams$', mode, re.IGNORECASE):
pass pass
......
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