From ed3f02bb64fc1fc157ea40f2c2e8c70f8c1294e0 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Tue, 12 Nov 2024 19:09:04 +0100 Subject: [PATCH] Remove LogCollectPing option: not used --- ci-scripts/Jenkinsfile-tmp-full-ran | 21 --------------------- ci-scripts/Jenkinsfile-tmp-multi-enb | 22 ---------------------- ci-scripts/Jenkinsfile-tmp-ran | 22 ---------------------- ci-scripts/cls_oaicitest.py | 11 ----------- ci-scripts/helpreadme.py | 1 - ci-scripts/main.py | 5 +---- 6 files changed, 1 insertion(+), 81 deletions(-) diff --git a/ci-scripts/Jenkinsfile-tmp-full-ran b/ci-scripts/Jenkinsfile-tmp-full-ran index 4ba94294e2..32a47dff9d 100644 --- a/ci-scripts/Jenkinsfile-tmp-full-ran +++ b/ci-scripts/Jenkinsfile-tmp-full-ran @@ -319,27 +319,6 @@ pipeline { } } } - stage('Log Collection (Ping)') { - when { - expression {doEpcLogCollection} - } - steps { - withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'] - ]) { - echo '\u2705 \u001B[32mLog Collection (Ping)\u001B[0m' - sh "python3 ci-scripts/main.py --mode=LogCollectPing --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}" - - echo '\u2705 \u001B[32mLog Transfer (Ping)\u001B[0m' - sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/ping.log.zip ./ping.log.${env.BUILD_ID}.zip || true" - } - script { - if(fileExists("ping.log.${env.BUILD_ID}.zip")) { - archiveArtifacts "ping.log.${env.BUILD_ID}.zip" - } - } - } - } stage('Log Collection (Iperf)') { when { expression {doEpcLogCollection} diff --git a/ci-scripts/Jenkinsfile-tmp-multi-enb b/ci-scripts/Jenkinsfile-tmp-multi-enb index 778c32ecb1..7bdaf9a35e 100644 --- a/ci-scripts/Jenkinsfile-tmp-multi-enb +++ b/ci-scripts/Jenkinsfile-tmp-multi-enb @@ -385,28 +385,6 @@ pipeline { } } } - stage('Log Collection (Ping)') { - // Bypassing this stage if EPC server is not defined - when { - expression { params.EPC_IPAddress != "none" } - } - steps { - withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'] - ]) { - echo '\u2705 \u001B[32mLog Collection (Ping)\u001B[0m' - sh "python3 ci-scripts/main.py --mode=LogCollectPing --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}" - - echo '\u2705 \u001B[32mLog Transfer (Ping)\u001B[0m' - sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/ping.log.zip ./ping.log.${env.BUILD_ID}.zip || true" - } - script { - if(fileExists("ping.log.${env.BUILD_ID}.zip")) { - archiveArtifacts "ping.log.${env.BUILD_ID}.zip" - } - } - } - } stage('Log Collection (Iperf)') { // Bypassing this stage if EPC server is not defined when { diff --git a/ci-scripts/Jenkinsfile-tmp-ran b/ci-scripts/Jenkinsfile-tmp-ran index bc8c742bb5..52545349e7 100644 --- a/ci-scripts/Jenkinsfile-tmp-ran +++ b/ci-scripts/Jenkinsfile-tmp-ran @@ -411,28 +411,6 @@ pipeline { } } } - stage('Log Collection (Ping)') { - // Bypassing this stage if EPC server is not defined - when { - expression { params.EPC_IPAddress != "none" } - } - steps { - withCredentials([ - [$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'] - ]) { - echo '\u2705 \u001B[32mLog Collection (Ping)\u001B[0m' - sh "python3 ci-scripts/main.py --mode=LogCollectPing --EPCIPAddress=${params.EPC_IPAddress} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --EPCType=${params.EPC_Type}" - - echo '\u2705 \u001B[32mLog Transfer (Ping)\u001B[0m' - sh "sshpass -p \'${EPC_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${EPC_Username}@${params.EPC_IPAddress}:${EPC_SourceCodePath}/scripts/ping.log.zip ./ping.log.${env.BUILD_ID}.zip || true" - } - script { - if(fileExists("ping.log.${env.BUILD_ID}.zip")) { - archiveArtifacts "ping.log.${env.BUILD_ID}.zip" - } - } - } - } stage('Log Collection (Iperf)') { // Bypassing this stage if EPC server is not defined when { diff --git a/ci-scripts/cls_oaicitest.py b/ci-scripts/cls_oaicitest.py index 435d7c4128..73e8d538a0 100644 --- a/ci-scripts/cls_oaicitest.py +++ b/ci-scripts/cls_oaicitest.py @@ -908,17 +908,6 @@ class OaiCiTest(): cmd.run(f'rm -f {d}/build.log.zip') cmd.run(f'cd {d} && zip -r build.log.zip build_log_*/*') - def LogCollectPing(self,EPC): - # Some pipelines are using "none" IP / Credentials - # In that case, just forget about it - if EPC.IPAddress == 'none': - sys.exit(0) - with cls_cmd.getConnection(EPC.IPAddress) as cmd: - d = f"{EPC.SourceCodePath}/scripts" - cmd.run(f'rm -f {d}/ping.log.zip') - cmd.run(f'cd {d} && zip ping.log.zip ping*.log') - cmd.run(f'rm {d}/ping*.log') - def LogCollectIperf(self,EPC): # Some pipelines are using "none" IP / Credentials # In that case, just forget about it diff --git a/ci-scripts/helpreadme.py b/ci-scripts/helpreadme.py index e1640fc899..7c1582e151 100644 --- a/ci-scripts/helpreadme.py +++ b/ci-scripts/helpreadme.py @@ -42,7 +42,6 @@ def GenericHelp(vers): print(' TesteNB') print(' InitiateHtml, FinalizeHtml') print(' TerminateeNB, TerminateHSS, TerminateMME, TerminateSPGW') - print(' LogCollectBuild, LogCollecteNB, LogCollectHSS, LogCollectMME, LogCollectSPGW, LogCollectPing, LogCollectIperf') print(' --local Force local execution: rewrites the test xml script before running to always execute on localhost. Assumes') print(' images are available locally, will not remove any images and will run inside the current repo directory') diff --git a/ci-scripts/main.py b/ci-scripts/main.py index ad451c68b5..2a61f030a4 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -572,10 +572,7 @@ elif re.match('^LogCollectSPGW$', mode, re.IGNORECASE): sys.exit('Insufficient Parameter') EPC.LogCollectSPGW() elif re.match('^LogCollectPing$', mode, re.IGNORECASE): - if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '': - HELP.GenericHelp(CONST.Version) - sys.exit('Insufficient Parameter') - CiTestObj.LogCollectPing(EPC) + logging.warning("Option LogCollectPing ignored") elif re.match('^LogCollectIperf$', mode, re.IGNORECASE): if EPC.IPAddress == '' or EPC.UserName == '' or EPC.Password == '' or EPC.SourceCodePath == '': HELP.GenericHelp(CONST.Version)