Commit 4eaadf8d authored by Raphael Defosseux's avatar Raphael Defosseux

CI: fixing slave pipelines

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 893e19fa
...@@ -51,7 +51,7 @@ termStatusArray[termOAIUE] = false ...@@ -51,7 +51,7 @@ termStatusArray[termOAIUE] = false
def eNB_Repository def eNB_Repository
def eNB_Branch def eNB_Branch
def eNB_CommitID def eNB_CommitID
def ranAllowMergeRequestProcess = false def eNB_AllowMergeRequestProcess = false
def eNB_TargetBranch def eNB_TargetBranch
def doEpcLogCollection = true def doEpcLogCollection = true
...@@ -130,8 +130,8 @@ pipeline { ...@@ -130,8 +130,8 @@ pipeline {
} }
echo "eNB_CommitID : ${eNB_CommitID}" echo "eNB_CommitID : ${eNB_CommitID}"
if (params.eNB_mergeRequest != null) { if (params.eNB_mergeRequest != null) {
ranAllowMergeRequestProcess = params.eNB_mergeRequest eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
if (ranAllowMergeRequestProcess) { if (eNB_AllowMergeRequestProcess) {
if (params.eNB_TargetBranch != null) { if (params.eNB_TargetBranch != null) {
eNB_TargetBranch = params.eNB_TargetBranch eNB_TargetBranch = params.eNB_TargetBranch
} else { } else {
...@@ -168,7 +168,7 @@ pipeline { ...@@ -168,7 +168,7 @@ pipeline {
if (allParametersPresent) { if (allParametersPresent) {
echo "All parameters are present" echo "All parameters are present"
if (ranAllowMergeRequestProcess) { if (eNB_AllowMergeRequestProcess) {
sh "git fetch" sh "git fetch"
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest" sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
} else { } else {
......
...@@ -41,7 +41,7 @@ def ciSmartPhoneResource = params.smartphonesResource ...@@ -41,7 +41,7 @@ def ciSmartPhoneResource = params.smartphonesResource
def eNB_Repository def eNB_Repository
def eNB_Branch def eNB_Branch
def eNB_CommitID def eNB_CommitID
def ranAllowMergeRequestProcess = false def eNB_AllowMergeRequestProcess = false
def eNB_TargetBranch def eNB_TargetBranch
pipeline { pipeline {
...@@ -124,8 +124,8 @@ pipeline { ...@@ -124,8 +124,8 @@ pipeline {
} }
echo "eNB_CommitID : ${eNB_CommitID}" echo "eNB_CommitID : ${eNB_CommitID}"
if (params.eNB_mergeRequest != null) { if (params.eNB_mergeRequest != null) {
ranAllowMergeRequestProcess = params.eNB_mergeRequest eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
if (ranAllowMergeRequestProcess) { if (eNB_AllowMergeRequestProcess) {
if (params.eNB_TargetBranch != null) { if (params.eNB_TargetBranch != null) {
eNB_TargetBranch = params.eNB_TargetBranch eNB_TargetBranch = params.eNB_TargetBranch
} else { } else {
...@@ -157,7 +157,7 @@ pipeline { ...@@ -157,7 +157,7 @@ pipeline {
if (allParametersPresent) { if (allParametersPresent) {
echo "All parameters are present" echo "All parameters are present"
if (ranAllowMergeRequestProcess) { if (eNB_AllowMergeRequestProcess) {
sh "git fetch" sh "git fetch"
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest" sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
} else { } else {
...@@ -198,12 +198,12 @@ pipeline { ...@@ -198,12 +198,12 @@ pipeline {
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'], [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password'] [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password']
]) { ]) {
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${ranAllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} ${mainPythonAllXmlFiles}" sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} ${mainPythonAllXmlFiles}"
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n") String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
for (xmlFile in myXmlTestSuite) { for (xmlFile in myXmlTestSuite) {
if (fileExists(xmlFile)) { if (fileExists(xmlFile)) {
try { try {
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${ranAllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_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}" sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_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}"
} catch (Exception e) { } catch (Exception e) {
currentBuild.result = 'FAILURE' currentBuild.result = 'FAILURE'
buildStageStatus = false buildStageStatus = false
......
...@@ -54,7 +54,7 @@ termStatusArray[termHSS] = false ...@@ -54,7 +54,7 @@ termStatusArray[termHSS] = false
def eNB_Repository def eNB_Repository
def eNB_Branch def eNB_Branch
def eNB_CommitID def eNB_CommitID
def ranAllowMergeRequestProcess = false def eNB_AllowMergeRequestProcess = false
def eNB_TargetBranch def eNB_TargetBranch
pipeline { pipeline {
...@@ -145,8 +145,8 @@ pipeline { ...@@ -145,8 +145,8 @@ pipeline {
} }
echo "eNB_CommitID : ${eNB_CommitID}" echo "eNB_CommitID : ${eNB_CommitID}"
if (params.eNB_mergeRequest != null) { if (params.eNB_mergeRequest != null) {
ranAllowMergeRequestProcess = params.eNB_mergeRequest eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
if (ranAllowMergeRequestProcess) { if (eNB_AllowMergeRequestProcess) {
if (params.eNB_TargetBranch != null) { if (params.eNB_TargetBranch != null) {
eNB_TargetBranch = params.eNB_TargetBranch eNB_TargetBranch = params.eNB_TargetBranch
} else { } else {
...@@ -178,7 +178,7 @@ pipeline { ...@@ -178,7 +178,7 @@ pipeline {
if (allParametersPresent) { if (allParametersPresent) {
echo "All parameters are present" echo "All parameters are present"
if (ranAllowMergeRequestProcess) { if (eNB_AllowMergeRequestProcess) {
sh "git fetch" sh "git fetch"
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest" sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
} else { } else {
......
...@@ -54,7 +54,7 @@ termStatusArray[termHSS] = false ...@@ -54,7 +54,7 @@ termStatusArray[termHSS] = false
def eNB_Repository def eNB_Repository
def eNB_Branch def eNB_Branch
def eNB_CommitID def eNB_CommitID
def ranAllowMergeRequestProcess = false def eNB_AllowMergeRequestProcess = false
def eNB_TargetBranch def eNB_TargetBranch
pipeline { pipeline {
...@@ -116,8 +116,8 @@ pipeline { ...@@ -116,8 +116,8 @@ pipeline {
} }
echo "eNB_CommitID : ${eNB_CommitID}" echo "eNB_CommitID : ${eNB_CommitID}"
if (params.eNB_mergeRequest != null) { if (params.eNB_mergeRequest != null) {
ranAllowMergeRequestProcess = params.eNB_mergeRequest eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
if (ranAllowMergeRequestProcess) { if (eNB_AllowMergeRequestProcess) {
if (params.eNB_TargetBranch != null) { if (params.eNB_TargetBranch != null) {
eNB_TargetBranch = params.eNB_TargetBranch eNB_TargetBranch = params.eNB_TargetBranch
} else { } else {
...@@ -149,7 +149,7 @@ pipeline { ...@@ -149,7 +149,7 @@ pipeline {
if (allParametersPresent) { if (allParametersPresent) {
echo "All parameters are present" echo "All parameters are present"
if (ranAllowMergeRequestProcess) { if (eNB_AllowMergeRequestProcess) {
sh "git fetch" sh "git fetch"
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest" sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
} else { } else {
......
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