From 72fc49ccf22a362f9ec0db6548ba601a7934a308 Mon Sep 17 00:00:00 2001
From: Raphael Defosseux <raphael.defosseux@eurecom.fr>
Date: Thu, 21 Nov 2019 15:31:36 +0100
Subject: [PATCH] CI: putting back flexran-ctl in build/testing --> now on
 develop branch of this repo

Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
---
 ci-scripts/Jenkinsfile-gitlab | 2 +-
 ci-scripts/buildOnVM.sh       | 6 +++++-
 ci-scripts/main.py            | 4 ++--
 ci-scripts/oai-ci-vm-tool     | 2 +-
 4 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/ci-scripts/Jenkinsfile-gitlab b/ci-scripts/Jenkinsfile-gitlab
index 86e9cdf74bf..4060a1f749f 100644
--- a/ci-scripts/Jenkinsfile-gitlab
+++ b/ci-scripts/Jenkinsfile-gitlab
@@ -131,8 +131,8 @@ pipeline {
                                 [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.FlexRanRtcGitLabRepository_Credentials}", usernameVariable: 'git_username', passwordVariable: 'git_password']
                                 ]) {
                                 sh "git clone https://${git_username}:${git_password}@gitlab.eurecom.fr/flexran/flexran-rtc.git . > ../git_clone.log 2>&1"
+                                sh "git checkout develop >> ../git_clone.log 2>&1"
                             }
-                            sh "sed -i -e 's#add-apt-repository.*cleishm.*neo4j#add-apt-repository ppa:cleishm/neo4j -y#' -e 's#libneo4j-client-dev#libneo4j-client-dev -y#' tools/install_dependencies"
                             sh "zip -r -qq flexran.zip ."
                         }
                     }
diff --git a/ci-scripts/buildOnVM.sh b/ci-scripts/buildOnVM.sh
index 858ddf6f6e2..ef2637965fe 100755
--- a/ci-scripts/buildOnVM.sh
+++ b/ci-scripts/buildOnVM.sh
@@ -179,8 +179,12 @@ function build_on_vm {
         echo "cp /home/ubuntu/zip-install.txt cmake_targets/log" >> $VM_CMDS
         echo "echo \"./tools/install_dependencies \"" >> $VM_CMDS
         echo "./tools/install_dependencies > cmake_targets/log/install-build.txt 2>&1" >> $VM_CMDS
+        echo "echo \"mkdir build\"" >> $VM_CMDS
+        echo "mkdir build" >> $VM_CMDS
+        echo "echo \"cd build\"" >> $VM_CMDS
+        echo "cd build" >> $VM_CMDS
         echo "echo \"$BUILD_OPTIONS \"" >> $VM_CMDS
-        echo "$BUILD_OPTIONS > cmake_targets/log/rt_controller.Rel15.txt 2>&1" >> $VM_CMDS
+        echo "$BUILD_OPTIONS > ../cmake_targets/log/rt_controller.Rel15.txt 2>&1" >> $VM_CMDS
     fi
     if [[ "$VM_NAME" != *"-cppcheck"* ]] && [[ "$VM_NAME" != *"-flexran-rtc"* ]]
     then
diff --git a/ci-scripts/main.py b/ci-scripts/main.py
index fc7d2090dbf..aaa7ede62a7 100644
--- a/ci-scripts/main.py
+++ b/ci-scripts/main.py
@@ -372,7 +372,7 @@ class SSHConnection():
 			self.air_interface = 'lte'
 		self.command('mkdir -p ' + lSourcePath, '\$', 5)
 		self.command('cd ' + lSourcePath, '\$', 5)
-		self.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + self.ranRepository + ' .; else stdbuf -o0 git fetch; fi', '\$', 600)
+		self.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + self.ranRepository + ' .; else stdbuf -o0 git fetch --prune; fi', '\$', 600)
 		# Raphael: here add a check if git clone or git fetch went smoothly
 		self.command('git config user.email "jenkins@openairinterface.org"', '\$', 5)
 		self.command('git config user.name "OAI Jenkins"', '\$', 5)
@@ -537,7 +537,7 @@ class SSHConnection():
 			ue_prefix = ''
 		self.command('mkdir -p ' + self.UESourceCodePath, '\$', 5)
 		self.command('cd ' + self.UESourceCodePath, '\$', 5)
-		self.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + self.ranRepository + ' .; else stdbuf -o0 git fetch; fi', '\$', 600)
+		self.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + self.ranRepository + ' .; else stdbuf -o0 git fetch --prune; fi', '\$', 600)
 		# here add a check if git clone or git fetch went smoothly
 		self.command('git config user.email "jenkins@openairinterface.org"', '\$', 5)
 		self.command('git config user.name "OAI Jenkins"', '\$', 5)
diff --git a/ci-scripts/oai-ci-vm-tool b/ci-scripts/oai-ci-vm-tool
index bbea199ca12..ce40134cec7 100755
--- a/ci-scripts/oai-ci-vm-tool
+++ b/ci-scripts/oai-ci-vm-tool
@@ -222,7 +222,7 @@ function variant__v8__ue_ethernet {
 function variant__v10__flexran_rtc {
     ARCHIVES_LOC=flexran
     NB_PATTERN_FILES=1
-    BUILD_OPTIONS="cmake . && make -j2"
+    BUILD_OPTIONS="cmake .. && make -j2"
     VARIANT_INFO="non-OSA"
 }
 
-- 
GitLab