X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2Fci-pipelines%2Fci_stage_3.groovy;h=b6efe3c603c9a36c63aa522f106f6348832e93b7;hb=refs%2Fchanges%2F18%2F12518%2F3;hp=4fea5919ab4fd61a95865425e7154a29aed2b6be;hpb=60fbb95e099692f52594cf7af053b276a4731700;p=osm%2Fdevops.git diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy index 4fea5919..b6efe3c6 100644 --- a/jenkins/ci-pipelines/ci_stage_3.groovy +++ b/jenkins/ci-pipelines/ci_stage_3.groovy @@ -153,8 +153,7 @@ void archive_logs(Map remote) { sshCommand remote: remote, command: '''ls -al logs''' sshGet remote: remote, from: 'logs', into: '.', override: true sh 'cp logs/* .' - sshGet remote: remote, from: 'ens3.pcap', into: 'ens3.pcap', override: true - archiveArtifacts artifacts: '*.log, *.pcap' + archiveArtifacts artifacts: '*.log' } String get_value(String key, String output) { @@ -450,7 +449,6 @@ node("${params.NODE}") { ] // Force time sync to avoid clock drift and invalid certificates - sshCommand remote: remote, command: 'nohup sudo tcpdump -i ens3 -w ens3.pcap -s 400 & sleep 5' sshCommand remote: remote, command: 'sudo apt-get update' sshCommand remote: remote, command: 'sudo apt-get install -y chrony' sshCommand remote: remote, command: 'sudo service chrony stop' @@ -546,10 +544,6 @@ node("${params.NODE}") { prometheusPort = 9091 osmHostname = IP_ADDRESS } - sshCommand remote: remote, command: """ - sudo killall tcpdump - """ - } // stage("Install") /////////////////////////////////////////////////////////////////////////////////////// // Health check of installed OSM in remote vm @@ -572,7 +566,6 @@ node("${params.NODE}") { if ( params.DO_ROBOT ) { try { stage('System Integration Test') { - if (useCharmedInstaller) { tempdir = sh(returnStdout: true, script: 'mktemp -d').trim() sh(script: "touch ${tempdir}/hosts") @@ -682,18 +675,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') {