X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2Fci-pipelines%2Fci_stage_3.groovy;h=d9d1fbdf5266346376239addf514ef8a48e506ea;hb=e0f5743b3e1372f5ca96b21a986f6a319ca9fd7d;hp=4fea5919ab4fd61a95865425e7154a29aed2b6be;hpb=38e4926c6f1d56df6690c8e3689a0e4bf1ce716a;p=osm%2Fdevops.git diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy index 4fea5919..d9d1fbdf 100644 --- a/jenkins/ci-pipelines/ci_stage_3.groovy +++ b/jenkins/ci-pipelines/ci_stage_3.groovy @@ -682,18 +682,22 @@ EOF""" } finally { stage('Archive Container Logs') { if ( ARCHIVE_LOGS_FLAG ) { - // Archive logs - remote = [ - name: containerName, - host: IP_ADDRESS, - user: 'ubuntu', - identityFile: SSH_KEY, - allowAnyHosts: true, - logLevel: 'INFO', - pty: true - ] - println('Archiving container logs') - archive_logs(remote) + try { + // Archive logs + remote = [ + name: containerName, + host: IP_ADDRESS, + user: 'ubuntu', + identityFile: SSH_KEY, + allowAnyHosts: true, + logLevel: 'INFO', + pty: true + ] + println('Archiving container logs') + archive_logs(remote) + } catch (Exception e) { + println('Error fetching logs: '+ e.getMessage()) + } } // end if ( ARCHIVE_LOGS_FLAG ) } stage('Cleanup') {