Skip to content

Commit 2c6e546

Browse files
SameeraPriyathamTadikondaMarkLogic Builder
authored andcommitted
Archiving error logs ml
1 parent 95dacb7 commit 2c6e546

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

Jenkinsfile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ pipeline{
8585
}
8686
failure {
8787
println("Unit Tests Failed")
88-
archiveArtifacts artifacts: '/var/opt/MarkLogic/Logs/*'
88+
sh 'mkdir -p MLLogs;cp -r /var/opt/MarkLogic/Logs/* $WORKSPACE/MLLogs/'
89+
archiveArtifacts artifacts: 'MLLogs/**/*'
8990
script{
9091
def email;
9192
if(env.CHANGE_AUTHOR){
@@ -251,7 +252,8 @@ pipeline{
251252
}
252253
failure {
253254
println("End-End Tests Failed")
254-
archiveArtifacts artifacts: '/var/opt/MarkLogic/Logs/*'
255+
sh 'mkdir -p MLLogs;cp -r /var/opt/MarkLogic/Logs/* $WORKSPACE/MLLogs/'
256+
archiveArtifacts artifacts: 'MLLogs/**/*'
255257
sendMail Email,'Check the Pipeline View Here: ${JENKINS_URL}/blue/organizations/jenkins/Datahub_CI/detail/$JOB_BASE_NAME/$BUILD_ID \n\n\n Check Console Output Here: ${BUILD_URL}/console \n\n\n Some of the End to End tests of the branch $BRANCH_NAME failed. Please fix the tests and create a PR or create a bug for the failures.',false,'rh7-singlenode Tests for $BRANCH_NAME Failed'
256258
}
257259
}
@@ -372,7 +374,8 @@ pipeline{
372374
}
373375
failure {
374376
println("rh7_cluster_9.0-7 Failed")
375-
archiveArtifacts artifacts: '/var/opt/MarkLogic/Logs/*'
377+
sh 'mkdir -p MLLogs;cp -r /var/opt/MarkLogic/Logs/* $WORKSPACE/MLLogs/'
378+
archiveArtifacts artifacts: 'MLLogs/**/*'
376379
sendMail Email,'Check the Pipeline View Here: ${JENKINS_URL}/blue/organizations/jenkins/Datahub_CI/detail/$JOB_BASE_NAME/$BUILD_ID \n\n\n Check Console Output Here: ${BUILD_URL}/console \n\n\n Some of the End to End tests of the branch $BRANCH_NAME on 9.0-7 rh7 cluster failed. Please fix the tests and create a PR or create a bug for the failures.',false,'rh7_cluster_9.0-7 Tests for $BRANCH_NAME Failed'
377380
}
378381
}
@@ -407,7 +410,8 @@ pipeline{
407410
}
408411
failure {
409412
println("rh7_cluster_9.0-8 Tests Failed")
410-
archiveArtifacts artifacts: '/var/opt/MarkLogic/Logs/*'
413+
sh 'mkdir -p MLLogs;cp -r /var/opt/MarkLogic/Logs/* $WORKSPACE/MLLogs/'
414+
archiveArtifacts artifacts: 'MLLogs/**/*'
411415
sendMail Email,'Check the Pipeline View Here: ${JENKINS_URL}/blue/organizations/jenkins/Datahub_CI/detail/$JOB_BASE_NAME/$BUILD_ID \n\n\n Check Console Output Here: ${BUILD_URL}/console \n\n\n Some of the End to End tests of the branch $BRANCH_NAME on 9.0-8 rh7 cluster failed. Please fix the tests and create a PR or create a bug for the failures.',false,'rh7_cluster_9.0-8 Tests for $BRANCH_NAME Failed'
412416
}
413417
}
@@ -590,7 +594,8 @@ pipeline{
590594
}
591595
failure {
592596
println("Sanity Tests Failed")
593-
archiveArtifacts artifacts: '/var/opt/MarkLogic/Logs/*'
597+
sh 'mkdir -p MLLogs;cp -r /var/opt/MarkLogic/Logs/* $WORKSPACE/MLLogs/'
598+
archiveArtifacts artifacts: 'MLLogs/**/*'
594599
sendMail Email,'Check the Pipeline View Here: ${JENKINS_URL}/blue/organizations/jenkins/Datahub_CI/detail/$JOB_BASE_NAME/$BUILD_ID \n\n\n Check Console Output Here: ${BUILD_URL}/console \n\n\n Some of the Sanity tests of the branch $BRANCH_NAME on failed. Please fix the tests and create a PR or create a bug for the failures.',false,'Sanity Tests for $BRANCH_NAME Failed'
595600
}
596601
}

0 commit comments

Comments
 (0)