Skip to content
Snippets Groups Projects
Commit 290a22e1 authored by Boris Djalal's avatar Boris Djalal
Browse files

Adapting log collection in Jenkins script.

parent 2c2d34dc
No related branches found
No related tags found
No related merge requests found
...@@ -236,38 +236,38 @@ pipeline { ...@@ -236,38 +236,38 @@ pipeline {
} }
stage('Log Collection') { stage('Log Collection') {
parallel { parallel {
stage('Log Collection (eNB - Build)') { stage('Log Collection (OAI UE - Build)') {
steps { steps {
echo '\u2705 \u001B[32mLog Collection (eNB - Build)\u001B[0m' echo '\u2705 \u001B[32mLog Collection (OAI UE - Build)\u001B[0m'
// withCredentials([ withCredentials([
// [$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 ci-scripts/main.py --mode=LogCollectBuild --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath}" 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 (eNB - Build)\u001B[0m' echo '\u2705 \u001B[32mLog Transfer (UE - 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" 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 { script {
// if(fileExists("build.log.${env.BUILD_ID}.zip")) { if(fileExists("build.log.${env.BUILD_ID}.zip")) {
// archiveArtifacts "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 { steps {
echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m' echo '\u2705 \u001B[32mLog Collection (OAI UE - Run)\u001B[0m'
// withCredentials([ withCredentials([
// [$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 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath}" 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 (eNB - Run)\u001B[0m' echo '\u2705 \u001B[32mLog Transfer (UE - 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" 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 { script {
if(fileExists("enb.log.${env.BUILD_ID}.zip")) { if(fileExists("ue.log.${env.BUILD_ID}.zip")) {
archiveArtifacts "enb.log.${env.BUILD_ID}.zip" archiveArtifacts "ue.log.${env.BUILD_ID}.zip"
} }
if(fileExists("ci-scripts/test_results.html")) { if(fileExists("ci-scripts/test_results.html")) {
sh "mv ci-scripts/test_results.html test_results-${JOB_NAME}.html" sh "mv ci-scripts/test_results.html test_results-${JOB_NAME}.html"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment