Commit 6836582c authored by Jaroslava Fiedlerova's avatar Jaroslava Fiedlerova Committed by Robert Schmidt

Harmonize Jenkinsfile log collection

- use same zip file in Jenkins artifacts for multiple pipelines
parent 8b339bb6
...@@ -211,10 +211,14 @@ pipeline { ...@@ -211,10 +211,14 @@ pipeline {
script { script {
dir ('ci-scripts') { dir ('ci-scripts') {
// Zipping all archived log files // Zipping all archived log files
sh "zip -r -qq physim_deploytest_logs_${env.BUILD_ID}.zip physim_test_logs_*/*" sh "zip -r -qq test_logs_${env.BUILD_ID}.zip *log*"
sh "rm -rf physim_test_logs_*/" sh "rm -r *.log"
if (fileExists("physim_deploytest_logs_${env.BUILD_ID}.zip")) { if (fileExists("test_logs_${env.BUILD_ID}.zip")) {
archiveArtifacts artifacts: "physim_deploytest_logs_${env.BUILD_ID}.zip" archiveArtifacts artifacts: "test_logs_${env.BUILD_ID}.zip"
}
if (fileExists("test_logs_CN.zip")){
sh "mv test_logs_CN.zip test_logs_CN_${env.BUILD_ID}.zip"
archiveArtifacts artifacts: "test_logs_CN_${env.BUILD_ID}.zip"
} }
if (fileExists("test_results.html")) { if (fileExists("test_results.html")) {
sh "mv test_results.html test_results-${env.JOB_NAME}.html" sh "mv test_results.html test_results-${env.JOB_NAME}.html"
......
...@@ -615,7 +615,8 @@ class EPCManagement(): ...@@ -615,7 +615,8 @@ class EPCManagement():
mySSH.run(f'oc logs -f {podName} -c {ii} &> {lSourcePath}/logs/{ii}.log &') mySSH.run(f'oc logs -f {podName} -c {ii} &> {lSourcePath}/logs/{ii}.log &')
mySSH.run(f'helm uninstall {ii}') mySSH.run(f'helm uninstall {ii}')
podName = '' podName = ''
mySSH.run(f'cd {lSourcePath}/logs && zip -r -qq {self.eNBSourceCodePath}/ci-scripts/CN_logs.zip *.log') mySSH.run(f'cd {lSourcePath}/logs && zip -r -qq {self.eNBSourceCodePath}/ci-scripts/test_logs_CN.zip *.log')
mySSH.copyin(f'{self.eNBSourceCodePath}/ci-scripts/test_logs_CN.zip','test_logs_CN.zip')
ret = mySSH.run(f'oc get pods', silent=True) ret = mySSH.run(f'oc get pods', silent=True)
res = re.search('No resources found in oaicicd-ran namespace.', ret.stdout) res = re.search('No resources found in oaicicd-ran namespace.', ret.stdout)
if res is not None: if res is not None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment