diff --git a/ci-scripts/Jenkinsfile-poll-gNB-UE b/ci-scripts/Jenkinsfile-poll-gNB-UE index 532415b016..a7521a4875 100644 --- a/ci-scripts/Jenkinsfile-poll-gNB-UE +++ b/ci-scripts/Jenkinsfile-poll-gNB-UE @@ -34,6 +34,7 @@ def sendSocialMediaMessage(pipeChannel, pipeColor, pipeMessage) { // Location of the test XML file to be run def testXMLFile = params.pythonTestXmlFile def mainPythonAllXmlFiles = "" +def buildStageStatus = true // Name of the phone resource def ciUSRPsResource = params.USRPsResource @@ -129,21 +130,6 @@ pipeline { eNB_CommitID = params.eNB_CommitID } echo "eNB_CommitID = ${eNB_CommitID}" - // If not present picking a default XML file - if (params.pythonTestXmlFile == null) { - // picking default - testXMLFile = 'xml_files/gnb_usrp_build.xml' - echo "Test XML file(default): ${testXMLFile}" - mainPythonAllXmlFiles += "--XMLTestFile=" + testXMLFile + " " - } else { - String[] myXmlTestSuite = testXMLFile.split("\\r?\\n") - for (xmlFile in myXmlTestSuite) { - if (fileExists("ci-scripts/" + xmlFile)) { - mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " " - echo "Test XML file : ${xmlFile}" - } - } - } // If not present picking a default Stage Name if (params.pipelineTestStageName == null) { // picking default @@ -193,6 +179,21 @@ pipeline { steps { script { dir ('ci-scripts') { + // If not present picking a default XML file + if (params.pythonTestXmlFile == null) { + // picking default + testXMLFile = 'xml_files/gnb_usrp_build.xml' + echo "Test XML file(default): ${testXMLFile}" + mainPythonAllXmlFiles += "--XMLTestFile=" + testXMLFile + " " + } else { + String[] myXmlTestSuite = testXMLFile.split("\\r?\\n") + for (xmlFile in myXmlTestSuite) { + if (fileExists(xmlFile)) { + mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " " + echo "Test XML file : ${xmlFile}" + } + } + } withCredentials([ [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'], [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password'] @@ -205,9 +206,11 @@ pipeline { sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --UEIPAddress=${params.eNB_IPAddress} --UEUserName=${eNB_Username} --UEPassword=${eNB_Password} --eNBBranch=${eNB_Branch} --eNBSourceCodePath=${params.eNB_SourceCodePath} --UESourceCodePath=${params.eNB_SourceCodePath} --eNBRepository=${eNB_Repository} --eNBCommitID=${eNB_CommitID} --ADBIPAddress=${ADB_IPAddress} --EPCIPAddress=${EPC_IPAddress} --XMLTestFile=${xmlFile}" } catch (Exception e) { currentBuild.result = 'FAILURE' + buildStageStatus = false } } } + sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}" } } } diff --git a/ci-scripts/main.py b/ci-scripts/main.py index b6bac27831..d94fe73a7d 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -2854,11 +2854,11 @@ class SSHConnection(): self.htmlFile.write(' \n') self.htmlFile.write(' \n') self.htmlFile.write(' \n') - self.htmlFile.write(' Final Status\n') + self.htmlFile.write(' Final Status\n') if passStatus: - self.htmlFile.write(' PASS \n') + self.htmlFile.write(' PASS \n') else: - self.htmlFile.write(' FAIL \n') + self.htmlFile.write(' FAIL \n') self.htmlFile.write(' \n') self.htmlFile.write(' \n') self.htmlFile.write('

\n') diff --git a/ci-scripts/xml_files/gnb_nr_ue_usrp_run.xml b/ci-scripts/xml_files/gnb_nr_ue_usrp_run.xml index c8cf457c71..f9d068c5b2 100644 --- a/ci-scripts/xml_files/gnb_nr_ue_usrp_run.xml +++ b/ci-scripts/xml_files/gnb_nr_ue_usrp_run.xml @@ -21,8 +21,8 @@ --> - run OAI gNB and OAI NR UE USRP - run-OAI-gNB-NR-UE-USRP + run-OAI-gNB-NR-UE-USRP + run OAI gNB and OAI NR UE USRP tasks 090101 000001 090102 000001 090108 090109 diff --git a/ci-scripts/xml_files/gnb_usrp_build.xml b/ci-scripts/xml_files/gnb_usrp_build.xml index 91db988fd8..1b57c077ba 100644 --- a/ci-scripts/xml_files/gnb_usrp_build.xml +++ b/ci-scripts/xml_files/gnb_usrp_build.xml @@ -21,7 +21,7 @@ --> - build-tab + gnb-build-tab Build-gNB wrench diff --git a/ci-scripts/xml_files/nr_ue_usrp_build.xml b/ci-scripts/xml_files/nr_ue_usrp_build.xml index 63c4d4f58b..7d8d97d2c5 100644 --- a/ci-scripts/xml_files/nr_ue_usrp_build.xml +++ b/ci-scripts/xml_files/nr_ue_usrp_build.xml @@ -21,7 +21,7 @@ --> - build-tab + nr-ue-build-tab Build-NR-UE wrench