From 4eaadf8d8219fb6e598435ae906abf9759c00781 Mon Sep 17 00:00:00 2001
From: Raphael Defosseux <raphael.defosseux@eurecom.fr>
Date: Sun, 26 Jan 2020 13:41:36 +0100
Subject: [PATCH] CI: fixing slave pipelines

Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
---
 ci-scripts/Jenkinsfile-tmp-full-ran  |  8 ++++----
 ci-scripts/Jenkinsfile-tmp-multi-enb | 12 ++++++------
 ci-scripts/Jenkinsfile-tmp-ran       |  8 ++++----
 ci-scripts/Jenkinsfile-tmp-ue        |  8 ++++----
 4 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/ci-scripts/Jenkinsfile-tmp-full-ran b/ci-scripts/Jenkinsfile-tmp-full-ran
index 096ff7f52dc..15ad0379afb 100644
--- a/ci-scripts/Jenkinsfile-tmp-full-ran
+++ b/ci-scripts/Jenkinsfile-tmp-full-ran
@@ -51,7 +51,7 @@ termStatusArray[termOAIUE] = false
 def eNB_Repository
 def eNB_Branch
 def eNB_CommitID
-def ranAllowMergeRequestProcess = false
+def eNB_AllowMergeRequestProcess = false
 def eNB_TargetBranch
 
 def doEpcLogCollection = true
@@ -130,8 +130,8 @@ pipeline {
                     }
                     echo "eNB_CommitID          :   ${eNB_CommitID}"
                     if (params.eNB_mergeRequest != null) {
-                        ranAllowMergeRequestProcess = params.eNB_mergeRequest
-                        if (ranAllowMergeRequestProcess) {
+                        eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
+                        if (eNB_AllowMergeRequestProcess) {
                             if (params.eNB_TargetBranch != null) {
                                 eNB_TargetBranch = params.eNB_TargetBranch
                             } else {
@@ -168,7 +168,7 @@ pipeline {
 
                     if (allParametersPresent) {
                         echo "All parameters are present"
-                        if (ranAllowMergeRequestProcess) {
+                        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 {
diff --git a/ci-scripts/Jenkinsfile-tmp-multi-enb b/ci-scripts/Jenkinsfile-tmp-multi-enb
index 4df2006ed22..c3b825ec062 100644
--- a/ci-scripts/Jenkinsfile-tmp-multi-enb
+++ b/ci-scripts/Jenkinsfile-tmp-multi-enb
@@ -41,7 +41,7 @@ def ciSmartPhoneResource = params.smartphonesResource
 def eNB_Repository
 def eNB_Branch
 def eNB_CommitID
-def ranAllowMergeRequestProcess = false
+def eNB_AllowMergeRequestProcess = false
 def eNB_TargetBranch
 
 pipeline {
@@ -124,8 +124,8 @@ pipeline {
                     }
                     echo "eNB_CommitID          :   ${eNB_CommitID}"
                     if (params.eNB_mergeRequest != null) {
-                        ranAllowMergeRequestProcess = params.eNB_mergeRequest
-                        if (ranAllowMergeRequestProcess) {
+                        eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
+                        if (eNB_AllowMergeRequestProcess) {
                             if (params.eNB_TargetBranch != null) {
                                 eNB_TargetBranch = params.eNB_TargetBranch
                             } else {
@@ -157,7 +157,7 @@ pipeline {
 
                     if (allParametersPresent) {
                         echo "All parameters are present"
-                        if (ranAllowMergeRequestProcess) {
+                        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 {
@@ -198,12 +198,12 @@ pipeline {
                             [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_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")
                             for (xmlFile in myXmlTestSuite) {
                                 if (fileExists(xmlFile)) {
                                     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) {
                                         currentBuild.result = 'FAILURE'
                                         buildStageStatus = false
diff --git a/ci-scripts/Jenkinsfile-tmp-ran b/ci-scripts/Jenkinsfile-tmp-ran
index ad852b8e935..a93a3a37581 100644
--- a/ci-scripts/Jenkinsfile-tmp-ran
+++ b/ci-scripts/Jenkinsfile-tmp-ran
@@ -54,7 +54,7 @@ termStatusArray[termHSS] = false
 def eNB_Repository
 def eNB_Branch
 def eNB_CommitID
-def ranAllowMergeRequestProcess = false
+def eNB_AllowMergeRequestProcess = false
 def eNB_TargetBranch
 
 pipeline {
@@ -145,8 +145,8 @@ pipeline {
                     }
                     echo "eNB_CommitID          :   ${eNB_CommitID}"
                     if (params.eNB_mergeRequest != null) {
-                        ranAllowMergeRequestProcess = params.eNB_mergeRequest
-                        if (ranAllowMergeRequestProcess) {
+                        eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
+                        if (eNB_AllowMergeRequestProcess) {
                             if (params.eNB_TargetBranch != null) {
                                 eNB_TargetBranch = params.eNB_TargetBranch
                             } else {
@@ -178,7 +178,7 @@ pipeline {
 
                     if (allParametersPresent) {
                         echo "All parameters are present"
-                        if (ranAllowMergeRequestProcess) {
+                        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 {
diff --git a/ci-scripts/Jenkinsfile-tmp-ue b/ci-scripts/Jenkinsfile-tmp-ue
index e22cd45615f..e5e456cf7fd 100644
--- a/ci-scripts/Jenkinsfile-tmp-ue
+++ b/ci-scripts/Jenkinsfile-tmp-ue
@@ -54,7 +54,7 @@ termStatusArray[termHSS] = false
 def eNB_Repository
 def eNB_Branch
 def eNB_CommitID
-def ranAllowMergeRequestProcess = false
+def eNB_AllowMergeRequestProcess = false
 def eNB_TargetBranch
 
 pipeline {
@@ -116,8 +116,8 @@ pipeline {
                     }
                     echo "eNB_CommitID          :   ${eNB_CommitID}"
                     if (params.eNB_mergeRequest != null) {
-                        ranAllowMergeRequestProcess = params.eNB_mergeRequest
-                        if (ranAllowMergeRequestProcess) {
+                        eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
+                        if (eNB_AllowMergeRequestProcess) {
                             if (params.eNB_TargetBranch != null) {
                                 eNB_TargetBranch = params.eNB_TargetBranch
                             } else {
@@ -149,7 +149,7 @@ pipeline {
 
                     if (allParametersPresent) {
                         echo "All parameters are present"
-                        if (ranAllowMergeRequestProcess) {
+                        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 {
-- 
GitLab