Commit d50abc66 authored by Raphael Defosseux's avatar Raphael Defosseux

fix(ci): proper disabling of the NRF BT test using dsTester

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@openairinterface.org>
parent 7da2ba6a
...@@ -175,9 +175,11 @@ pipeline { ...@@ -175,9 +175,11 @@ pipeline {
success { success {
script { script {
sh 'echo "DEPLOYMENT: OK" > archives/deployment_status.log' sh 'echo "DEPLOYMENT: OK" > archives/deployment_status.log'
if (dsT_host_flag) {
sh 'python3 ./ci-scripts/routeCheck.py --mode=Add --userName=' + dsT_host_user + ' --hostName=' + dsT_host sh 'python3 ./ci-scripts/routeCheck.py --mode=Add --userName=' + dsT_host_user + ' --hostName=' + dsT_host
} }
} }
}
unsuccessful { unsuccessful {
script { script {
sh 'echo "DEPLOYMENT: KO" > archives/deployment_status.log' sh 'echo "DEPLOYMENT: KO" > archives/deployment_status.log'
...@@ -235,7 +237,9 @@ pipeline { ...@@ -235,7 +237,9 @@ pipeline {
steps { steps {
script { script {
echo '\u2705 \u001B[32mUn-Deploy NRF\u001B[0m' echo '\u2705 \u001B[32mUn-Deploy NRF\u001B[0m'
if (dsT_host_flag) {
sh 'python3 ./ci-scripts/routeCheck.py --mode=Delete --userName=' + dsT_host_user + ' --hostName=' + dsT_host sh 'python3 ./ci-scripts/routeCheck.py --mode=Delete --userName=' + dsT_host_user + ' --hostName=' + dsT_host
}
dir('ci-scripts/dsTesterDockerCompose') { dir('ci-scripts/dsTesterDockerCompose') {
sh 'docker-compose down > ../../archives/compose_normal_down.log 2>&1' sh 'docker-compose down > ../../archives/compose_normal_down.log 2>&1'
} }
...@@ -252,7 +256,9 @@ pipeline { ...@@ -252,7 +256,9 @@ pipeline {
sh 'docker logs cicd-oai-nrf > archives/logs/oai_nrf.log' sh 'docker logs cicd-oai-nrf > archives/logs/oai_nrf.log'
} }
// Remove any leftover containers/networks // Remove any leftover containers/networks
if (dsT_host_flag) {
sh 'python3 ./ci-scripts/routeCheck.py --mode=Delete --userName=' + dsT_host_user + ' --hostName=' + dsT_host sh 'python3 ./ci-scripts/routeCheck.py --mode=Delete --userName=' + dsT_host_user + ' --hostName=' + dsT_host
}
dir('ci-scripts/dsTesterDockerCompose') { dir('ci-scripts/dsTesterDockerCompose') {
sh 'docker-compose down > ../../archives/compose_l_down.log 2>&1' sh 'docker-compose down > ../../archives/compose_l_down.log 2>&1'
} }
......
...@@ -176,8 +176,14 @@ class HtmlReport(): ...@@ -176,8 +176,14 @@ class HtmlReport():
self.file.write(' </tr>\n') self.file.write(' </tr>\n')
def testSummaryHeader(self): def testSummaryHeader(self):
self.file.write(' <h2>DS Tester Summary</h2>\n')
cwd = os.getcwd() cwd = os.getcwd()
if not os.path.isfile(cwd + '/DS-TEST-RESULTS/dsTester_Summary.txt'):
self.file.write(' <br>\n')
self.file.write(' <div class="alert alert-warning">\n')
self.file.write(' <strong>NO TESTING DONE BEFORE MIGRATION TO NEW RAN EMULATOR <span class="glyphicon glyphicon-warning-sign"></span></strong>\n')
self.file.write(' </div>\n')
return True
self.file.write(' <h2>DS Tester Summary</h2>\n')
finalStatusOK = False finalStatusOK = False
if os.path.isfile(cwd + '/DS-TEST-RESULTS/dcnrf2.yaml'): if os.path.isfile(cwd + '/DS-TEST-RESULTS/dcnrf2.yaml'):
cmd = f'egrep -c "final-result: pass" DS-TEST-RESULTS/dcnrf2.yaml || true' cmd = f'egrep -c "final-result: pass" DS-TEST-RESULTS/dcnrf2.yaml || true'
...@@ -204,6 +210,9 @@ class HtmlReport(): ...@@ -204,6 +210,9 @@ class HtmlReport():
def testSummaryDetails(self): def testSummaryDetails(self):
self.file.write(' <br>\n') self.file.write(' <br>\n')
cwd = os.getcwd()
if not os.path.isfile(cwd + '/DS-TEST-RESULTS/dsTester_Summary.txt'):
return
self.file.write(' <button data-toggle="collapse" data-target="#ds-tester-details">More details on DsTester results</button>\n') self.file.write(' <button data-toggle="collapse" data-target="#ds-tester-details">More details on DsTester results</button>\n')
self.file.write(' <div id="ds-tester-details" class="collapse">\n') self.file.write(' <div id="ds-tester-details" class="collapse">\n')
self.file.write(' <table class="table-bordered" width = "60%" align = "center" border = 1>\n') self.file.write(' <table class="table-bordered" width = "60%" align = "center" border = 1>\n')
...@@ -212,7 +221,6 @@ class HtmlReport(): ...@@ -212,7 +221,6 @@ class HtmlReport():
self.file.write(' <th>Test Status</th>\n') self.file.write(' <th>Test Status</th>\n')
self.file.write(' <th>Test Details</th>\n') self.file.write(' <th>Test Details</th>\n')
self.file.write(' </tr>\n') self.file.write(' </tr>\n')
cwd = os.getcwd()
if os.path.isfile(cwd + '/DS-TEST-RESULTS/dcnrf2.yaml'): if os.path.isfile(cwd + '/DS-TEST-RESULTS/dcnrf2.yaml'):
with open(cwd + '/DS-TEST-RESULTS/dcnrf2.yaml') as f: with open(cwd + '/DS-TEST-RESULTS/dcnrf2.yaml') as f:
data = yaml.load(f) data = yaml.load(f)
......
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