X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=jenkins%2Fci-pipelines%2Fci_stage_3.groovy;h=b35e02767cdf101e4e2eb05b905120dd1b7b6d4d;hb=4ae47aa2766aaaa432c8c77f23e97dbdfd7fb0f6;hp=29b0e0b87349283ec478cff82900990bdcd471bb;hpb=700082a79606e71761694b110865753e5eda2c53;p=osm%2Fdevops.git diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy index 29b0e0b8..b35e0276 100644 --- a/jenkins/ci-pipelines/ci_stage_3.groovy +++ b/jenkins/ci-pipelines/ci_stage_3.groovy @@ -101,6 +101,13 @@ def run_robot_systest(stackName,tagName,testName,envfile=null,kubeconfig=null,cl ]) } +def archive_logs(stackName) { + sh """ + docker service ls | grep ${stackname} | awk '{print $2}' | xargs -i% docker service logs "%" --timestamps > containers_logs.txt 2>&1 + """ + archiveArtifacts artifacts: 'containers_logs.txt' +} + node("${params.NODE}") { sh 'env' @@ -315,7 +322,8 @@ node("${params.NODE}") { } //else { run_systest(container_name,container_name,"openstack_stage_4",params.HIVE_VIM_1) //} - + // Archive logs to containers_logs.txt + archive_logs(container_name) if ( ! currentBuild.result.equals('UNSTABLE') && ! currentBuild.result.equals('FAILURE')) { stage_archive = keep_artifacts } else {