Commit 03946cd4 authored by Robert Schmidt's avatar Robert Schmidt
Browse files

Merge branch 'integration_2024_w47' into 'develop'

Integration: `2024.w47`

See merge request !3120

* !2972 Parallelize PUSCH channel estimation
* !3105 Fix a small bug with total_res in gNB PUSCH symbol processing
* !2996 Ue monitoring stats
* !3122 Avoid assert on non-implemented SM write callback
* !3110 Fronthaul 7.2 improvements (1. step towards M-plane integration)
* !2966 Refactor of includes in gNB/UE for improved header management
* !3123 Reduce double-usage of CI XML files
* !3029 NR UE RRC reconfiguration improvements
* !2670 chore(ci): adding Flexric-RAN integration test
* !3124 CI: use OC CN in aerial pipeline
parents 68191088 b8b4057e
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -285,6 +285,29 @@ pipeline {
            }
          }
        }
        stage ("OAI-FLEXRIC-RAN-Integration-Test") {
          when { expression {do5Gtest} }
          steps {
            script {
              triggerSlaveJob ('OAI-FLEXRIC-RAN-Integration-Test', 'OAI-FLEXRIC-RAN-Integration-Test')
            }
          }
          post {
            always {
              script {
                // Using a unique variable name for each test stage to avoid overwriting on a global variable
                // due to parallel-time concurrency
                flexricRAN5GStatus = finalizeSlaveJob('OAI-FLEXRIC-RAN-Integration-Test')
              }
            }
            failure {
              script {
                currentBuild.result = 'FAILURE'
                failingStages += flexricRAN5GStatus
              }
            }
          }
        }
        stage ("L2-Sim-Test-4G") {
          when { expression {do4Gtest} }
          steps {
+13 −5
Original line number Diff line number Diff line
@@ -58,6 +58,8 @@ def eNB_CommitID
def eNB_AllowMergeRequestProcess = false
def eNB_TargetBranch

def flexricOption = ""

pipeline {
    agent {
        label pythonExecutor
@@ -148,18 +150,24 @@ pipeline {
                        allParametersPresent = false
                    }

                    if (params.Flexric_Tag != null) {
                        echo "This pipeline is configured to run with a FlexRIC deployment."
                        echo "Appending FlexRicTag option to the list of options"
                        flexricOption = "--FlexRicTag=${params.Flexric_Tag}"
                        echo "Using new Flexric option: ${flexricOption}"
                    }

                    if (allParametersPresent) {
                        echo "All parameters are present"
                        if (eNB_AllowMergeRequestProcess) {
                            sh "git fetch"
                            sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
                        } else {
                        } else if (eNB_CommitID != 'develop') {
                            sh "git fetch"
                            sh "git checkout -f ${eNB_CommitID}"
                        }
                    } else {
                        echo "Some parameters are missing"
                        sh "./ci-scripts/fail.sh"
                        error "Some parameters are missing"
                    }
                }
            }
@@ -190,13 +198,13 @@ pipeline {
                            [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
                            [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
                        ]) {
                            sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${mainPythonAllXmlFiles}"
                            sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${flexricOption} ${mainPythonAllXmlFiles}"
                            String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
                            for (xmlFile in myXmlTestSuite) {
                            if (fileExists(xmlFile)) {
                                try {
                                  timeout (time: 60, unit: 'MINUTES') {
                                    sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --XMLTestFile=${xmlFile}"
                                    sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} ${flexricOption} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --XMLTestFile=${xmlFile}"
                                  }
                                } catch (Exception e) {
                                    currentBuild.result = 'FAILURE'
+3 −0
Original line number Diff line number Diff line
@@ -264,6 +264,9 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER):
        elif re.match('^\-\-BuildId=(.+)$', myArgv, re.IGNORECASE):
            matchReg = re.match('^\-\-BuildId=(.+)$', myArgv, re.IGNORECASE)
            RAN.BuildId = matchReg.group(1)
        elif re.match('^\-\-FlexRicTag=(.+)$', myArgv, re.IGNORECASE):
            matchReg = re.match('^\-\-FlexRicTag=(.+)$', myArgv, re.IGNORECASE)
            CONTAINERS.flexricTag = matchReg.group(1)
        else:
            HELP.GenericHelp(CONST.Version)
            sys.exit('Invalid Parameter: ' + myArgv)
+9 −2
Original line number Diff line number Diff line
@@ -28,8 +28,8 @@ up2-fhi72:

up2-aerial:
  Host: up2
  AttachScript: sudo /opt/mbim-aerial/start_quectel_mbim.sh
  DetachScript: sudo /opt/mbim-aerial/stop_quectel_mbim.sh
  AttachScript: sudo /opt/mbim-fhi72/start_quectel_mbim.sh
  DetachScript: sudo /opt/mbim-fhi72/stop_quectel_mbim.sh
  NetworkScript: ip a show dev wwan0
  IF: wwan0
  MTU: 1500
@@ -75,6 +75,13 @@ oc-cn5g-20897:
  NetworkScript: echo "inet 172.21.6.105"
  RunIperf3Server: False

oc-cn5g-20897-aerial2:
  Host: aerial2
  Namespace: "oaicicd-core-for-fhi72"
  CNPath: "/opt/oai-cn5g-fed-develop-2024-april-20897"
  NetworkScript: echo "inet 172.21.6.105"
  RunIperf3Server: False

matix-cn5g:
  Host: matix
  NetworkScript: docker exec prod-trf-gen ip a show dev eth0
+21 −37
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ def OC_deploy_CN(cmd, ocUserName, ocPassword, ocNamespace, path):
	if not succeeded:
		return False, CONST.OC_LOGIN_FAIL
	cmd.run('helm uninstall oai5gcn --wait --timeout 60s')
	ret = cmd.run(f'helm install --wait --timeout 60s oai5gcn {path}/ci-scripts/charts/oai-5g-basic/.')
	ret = cmd.run(f'helm install --wait --timeout 120s oai5gcn {path}/ci-scripts/charts/oai-5g-basic/.')
	if ret.returncode != 0:
		logging.error('OC OAI CN5G: Deployment failed')
		OC_logout(cmd)
@@ -126,8 +126,6 @@ class Cluster:
		self.ranAllowMerge = False
		self.ranTargetBranch = ""
		self.cmd = None
		self.imageToPull = ''
		self.testSvrId = None

	def _recreate_entitlements(self):
		# recreating entitlements, don't care if deletion fails
@@ -240,44 +238,30 @@ class Cluster:
	def _undeploy_pod(self, filename):
		self.cmd.run(f'oc delete -f {filename}')

	def PullClusterImage(self, HTML, RAN):
		if self.testSvrId == None: self.testSvrId = self.eNBIPAddress
		if self.imageToPull == '':
			HELP.GenericHelp(CONST.Version)
			raise ValueError('Insufficient Parameter')
		logging.debug(f'Pull OC image {self.imageToPull} to server {self.testSvrId}')
	def PullClusterImage(self, HTML, node, images):
		logging.debug(f'Pull OC image {images} to server {node}')
		self.testCase_id = HTML.testCase_id
		cmd = cls_cmd.getConnection(self.testSvrId)
		logging.info(cmd.run('docker --version'))
		with cls_cmd.getConnection(node) as cmd:
			succeeded = OC_login(cmd, self.OCUserName, self.OCPassword, CI_OC_RAN_NAMESPACE)
			if not succeeded:
			logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
				HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL)
				return False
			ret = cmd.run(f'oc whoami -t | docker login -u oaicicd --password-stdin {self.OCRegistry}')
			if ret.returncode != 0:
			logging.error(f'\u001B[1m Unable to access OC project {CI_OC_RAN_NAMESPACE}\u001B[0m')
				logging.error(f'cannot authenticate at registry')
				OC_logout(cmd)
			cmd.close()
				HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL)
				return False
		for image in self.imageToPull:
			imagePrefix = f'{self.OCRegistry}/{CI_OC_RAN_NAMESPACE}'
			tag = cls_containerize.CreateTag(self.ranCommitID, self.ranBranch, self.ranAllowMerge)
			imageTag = f"{image}:{tag}"
			ret = cmd.run(f'docker pull {imagePrefix}/{imageTag}')
			if ret.returncode != 0:
				logging.error(f'Could not pull {image} from local registry : {self.OCRegistry}')
			registry = f'{self.OCRegistry}/{CI_OC_RAN_NAMESPACE}'
			success, msg = cls_containerize.Containerize.Pull_Image(cmd, images, tag, registry, None, None)
			OC_logout(cmd)
				cmd.close()
				HTML.CreateHtmlTestRow('msg', 'KO', CONST.ALL_PROCESSES_OK)
				return False
			cmd.run(f'docker tag {imagePrefix}/{imageTag} oai-ci/{imageTag}')
			cmd.run(f'docker rmi {imagePrefix}/{imageTag}')
		OC_logout(cmd)
		cmd.close()
		HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
		return True
		param = f"on node {node}"
		if success:
			HTML.CreateHtmlTestRowQueue(param, 'OK', [msg])
		else:
			HTML.CreateHtmlTestRowQueue(param, 'KO', [msg])
		return success

	def BuildClusterImage(self, HTML):
		if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '':
Loading