Harmonize Jenkinsfile log collection
- use same zip file in Jenkins artifacts for multiple pipelines
This commit is contained in:
committed by
Robert Schmidt
parent
8b339bb659
commit
6836582ca1
@@ -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"
|
||||||
|
|||||||
+2
-1
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user