Commit 51852733 authored by Mohammed Ismail's avatar Mohammed Ismail

CI: parameters changes

Signed-off-by: default avatarMohammed Ismail <mohammed.ismail@openairinterface.org>
parent 39f395c0
......@@ -194,7 +194,7 @@ pipeline {
for (xmlFile in myXmlTestSuite) {
if (fileExists(xmlFile)) {
try {
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} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${ADB_Password} --OCWorkspace=${OC_Workspace}"
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} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCWorkspace=${OC_Workspace}"
} catch (Exception e) {
currentBuild.result = 'FAILURE'
buildStageStatus = false
......
......@@ -262,7 +262,7 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM):
PHYSIM.OCUserName = matchReg.group(1)
elif re.match('^\-\-OCPassword=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-OCPassword=(.+)$', myArgv, re.IGNORECASE)
PHYSIM.OCPassWord = matchReg.group(1)
PHYSIM.OCPassword = matchReg.group(1)
elif re.match('^\-\-OCWorkspace=(.+)$', myArgv, re.IGNORECASE):
matchReg = re.match('^\-\-OCWorkspace=(.+)$', myArgv, re.IGNORECASE)
PHYSIM.OCWorkspace = matchReg.group(1)
......
......@@ -69,8 +69,11 @@ class PhySim:
lUserName = self.eNBUserName
lPassWord = self.eNBPassword
lSourcePath = self.eNBSourceCodePath
ocUserName = self.OCUserName
ocPassword = self.OCPassword
ocWorkspace = self.OCWorkspace
if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '' or ocUserName == '' or ocPassword == '' or ocWorkspace == '':
HELP.GenericHelp(CONST.Version)
sys.exit('Insufficient Parameter')
logging.debug('Building on server: ' + lIpAddr)
......@@ -120,19 +123,19 @@ class PhySim:
logging.debug('oai-physim size is unknown')
# logging to OC cluster
mySSH.command(f'oc login -u {self.OCUserName} -p {self.OCPassword}', '\$', 6)
mySSH.command(f'oc login -u {ocUserName} -p {ocPassword}', '\$', 6)
print(mySSH.getBefore())
if mySSH.getBefore().count('Login successful.') == 0:
logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
sys.exit(-1)
else:
logging.debug('\u001B[1m Login to OC Cluster Successfully\u001B[0m')
mySSH.command(f'oc project {self.OCWorkspace}', '\$', 6)
if (mySSH.getBefore().count(f'Already on project "{self.OCWorkspace}"')) == 0 or (mySSH.getBefore().count(f'Now using project "{self.OCWorkspace}"')) == 0:
logging.error(f'\u001B[1m Unable to access OC project {self.OCWorkspace}\u001B[0m')
mySSH.command(f'oc project {ocWorkspace}', '\$', 6)
if mySSH.getBefore().count(f'Already on project "{ocWorkspace}"') == 0 or mySSH.getBefore().count(f'Now using project "{self.OCWorkspace}"') == 0:
logging.error(f'\u001B[1m Unable to access OC project {ocWorkspace}\u001B[0m')
sys.exit(-1)
else:
logging.debug(f'\u001B[1m Now using project {self.OCWorkspace}\u001B[0m')
logging.debug(f'\u001B[1m Now using project {ocWorkspace}\u001B[0m')
# Using helm charts deployment
mySSH.command('helm install physim ./charts/physims/', '\$', 6)
......
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