From 290a22e1baa4db042ed593e38845ebdd02f88f09 Mon Sep 17 00:00:00 2001
From: Boris Djalal <boris.djalal@eurecom.fr>
Date: Fri, 22 Mar 2019 13:26:39 +0100
Subject: [PATCH] Adapting log collection in Jenkins script.

Signed-off-by: Boris Djalal <boris.djalal@eurecom.fr>
---
 ci-scripts/Jenkinsfile-tmp-ue | 54 +++++++++++++++++------------------
 1 file changed, 27 insertions(+), 27 deletions(-)

diff --git a/ci-scripts/Jenkinsfile-tmp-ue b/ci-scripts/Jenkinsfile-tmp-ue
index 16ba3ef4c64..617d7c25ae0 100644
--- a/ci-scripts/Jenkinsfile-tmp-ue
+++ b/ci-scripts/Jenkinsfile-tmp-ue
@@ -236,38 +236,38 @@ pipeline {
         }
         stage('Log Collection') {
             parallel {
-                stage('Log Collection (eNB - Build)') {
+                stage('Log Collection (OAI UE - Build)') {
                     steps {
-                        echo '\u2705 \u001B[32mLog Collection (eNB - Build)\u001B[0m'
-//                        withCredentials([
-//                             [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
-//                        ]) {
-//                            sh "python3 ci-scripts/main.py --mode=LogCollectBuild --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath}"
-//
-//                            echo '\u2705 \u001B[32mLog Transfer (eNB - Build)\u001B[0m'
-//                            sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/build.log.zip ./build.log.${env.BUILD_ID}.zip || true"
-//                        }
-//                        script {
-//                            if(fileExists("build.log.${env.BUILD_ID}.zip")) {
-//                                archiveArtifacts "build.log.${env.BUILD_ID}.zip"
-//                            }
-//                        }
+                        echo '\u2705 \u001B[32mLog Collection (OAI UE - Build)\u001B[0m'
+                        withCredentials([
+                             [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password']
+                        ]) {
+                            sh "python3 ci-scripts/main.py --mode=LogCollectBuild --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath}"
+
+                            echo '\u2705 \u001B[32mLog Transfer (UE - Build)\u001B[0m'
+                            sh "sshpass -p \'${UE_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${UE_Username}@${params.UE_IPAddress}:${UE_SourceCodePath}/cmake_targets/build.log.zip ./build.log.${env.BUILD_ID}.zip || true"
+                        }
+                        script {
+                            if(fileExists("build.log.${env.BUILD_ID}.zip")) {
+                                archiveArtifacts "build.log.${env.BUILD_ID}.zip"
+                            }
+                        }
                     }
                 }
-                stage('Log Collection (eNB - Run)') {
+                stage('Log Collection (OAI UE - Run)') {
                     steps {
-                        echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m'
-//                        withCredentials([
-//                             [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
-//                        ]) {
-//                            sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath}"
-//
-//                            echo '\u2705 \u001B[32mLog Transfer (eNB - Run)\u001B[0m'
-//                            sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/enb.log.zip ./enb.log.${env.BUILD_ID}.zip || true"
-//                        }
+                        echo '\u2705 \u001B[32mLog Collection (OAI UE - Run)\u001B[0m'
+                        withCredentials([
+                             [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.UE_Credentials}", usernameVariable: 'UE_Username', passwordVariable: 'UE_Password']
+                        ]) {
+                            sh "python3 ci-scripts/main.py --mode=LogCollectUE --UEIPAddress=${params.UE_IPAddress} --UEUserName=${UE_Username} --UEPassword=${UE_Password} --UESourceCodePath=${params.UE_SourceCodePath}"
+
+                            echo '\u2705 \u001B[32mLog Transfer (UE - Run)\u001B[0m'
+                            sh "sshpass -p \'${UE_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${UE_Username}@${params.UE_IPAddress}:${UE_SourceCodePath}/cmake_targets/ue.log.zip ./ue.log.${env.BUILD_ID}.zip || true"
+                        }
                         script {
-                            if(fileExists("enb.log.${env.BUILD_ID}.zip")) {
-                                archiveArtifacts "enb.log.${env.BUILD_ID}.zip"
+                            if(fileExists("ue.log.${env.BUILD_ID}.zip")) {
+                                archiveArtifacts "ue.log.${env.BUILD_ID}.zip"
                             }
                             if(fileExists("ci-scripts/test_results.html")) {
                                 sh "mv ci-scripts/test_results.html test_results-${JOB_NAME}.html"
-- 
GitLab