Commit 6a6e786a authored by Boris Djalal's avatar Boris Djalal

Setting variables.

Signed-off-by: default avatarBoris Djalal <boris.djalal@eurecom.fr>
parent ae680925
......@@ -43,6 +43,13 @@ def eNB_Branch
def eNB_CommitID
def eNB_AllowMergeRequestProcess = false
def eNB_TargetBranch
// Global Parameters not to break the main.py command line and code.
def ADBIPAddress = "none"
def ADBUserName = "none"
def ADBPassword = "none"
def EPCIPAddress = "none"
pipeline {
agent {
......@@ -160,10 +167,10 @@ pipeline {
echo "end if 2"
// The following parameters are kept not to break the current main.py command line and code.
// They should be removed in the future.
if (params.ADB_IPAddress == null) {
params.ADB_IPAddress = "none"
}
echo "params.ADB_IPAddress = ${params.ADB_IPAddress}"
//if (params.ADB_IPAddress == null) {
// params.ADB_IPAddress = "none"
//}
//echo "params.ADB_IPAddress = ${params.ADB_IPAddress}"
}
}
}
......@@ -180,6 +187,7 @@ pipeline {
echo "eNB_CommitID= ${eNB_CommitID}"
echo "eNB_AllowMergeRequestProcess= ${eNB_AllowMergeRequestProcess}"
echo "params.ADB_IPAddress= ${params.ADB_IPAddress}"
echo "ADB_IPAddress= ${ADB_IPAddress}"
echo "ADB_Username = ${ADB_Username}"
echo "ADB_Password = ${ADB_Password}"
echo "eNB_Password = ${eNB_Password}"
......@@ -197,12 +205,12 @@ pipeline {
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password']
]) {
sh "python3 main.py --mode=InitiateHtml --eNBRepository=${eNB_Repository} --eNBBranch=${eNB_Branch} --eNBCommitID=${eNB_CommitID} --eNB_AllowMerge=${eNB_AllowMergeRequestProcess} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --eNBIPAddress=127.0.0.1 --eNBUserName=carabe --eNBPassword=${eNB_Password} ${mainPythonAllXmlFiles}"
sh "python3 main.py --mode=InitiateHtml --eNBRepository=${eNB_Repository} --eNBBranch=${eNB_Branch} --eNBCommitID=${eNB_CommitID} --eNB_AllowMerge=${eNB_AllowMergeRequestProcess} --ADBIPAddress=${ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --eNBIPAddress=127.0.0.1 --eNBUserName=carabe --eNBPassword=${eNB_Password} ${mainPythonAllXmlFiles}"
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
for (xmlFile in myXmlTestSuite) {
if (fileExists(xmlFile)) {
try {
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBBranch=${eNB_Branch} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNBRepository=${eNB_Repository} --eNBCommitID=${eNB_CommitID} --ADBIPAddress=${params.ADB_IPAddress} --EPCIPAddress=${params.EPC_IPAddress} --XMLTestFile=${xmlFile}"
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBBranch=${eNB_Branch} --eNBSourceCodePath=${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
......
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