X-Git-Url: https://gerrit.nordix.org/gitweb?a=blobdiff_plain;f=jjb%2Fnsm%2Fe2e-long-run.Jenkinsfile;h=15913737f19a1f3da8b30e9370504434cd38561d;hb=108c0cb62c3677e0bc5fef183019b06a50771cc6;hp=7b4ff55ed93362af8a3c0a13fb87b3b5d948ad5f;hpb=29378c365fabbdd8f95b6b00519afa20a78d3e19;p=infra%2Fcicd.git diff --git a/jjb/nsm/e2e-long-run.Jenkinsfile b/jjb/nsm/e2e-long-run.Jenkinsfile index 7b4ff55e..15913737 100644 --- a/jjb/nsm/e2e-long-run.Jenkinsfile +++ b/jjb/nsm/e2e-long-run.Jenkinsfile @@ -65,6 +65,9 @@ node('nordix-nsm-build-ubuntu2204') { stage('E2E List') { E2EList(number_of_runs, interval, environment_name, ip_family, focus, skip).call() } + stage('Report') { + Report(environment_name, ip_family).call() + } stage('Cleanup') { Cleanup() } @@ -101,6 +104,27 @@ def E2E(id, previous_id, interval, environment_name, ip_family, focus, skip) { unstable 'Failing e2e' } } + Archive(id).call() + } + } +} + +def Report(environment_name, ip_family) { + return { + // Collect logs + def command = "cd ./test/e2e ; ./environment/$environment_name/$ip_family/test.sh on_failure" + ExecSh(command).call() + Archive('Report').call() + } +} + +def Archive(id) { + return { + try { + sh "tar -czvf ${id}.tar.gz -C _output ." + archiveArtifacts artifacts: "${id}.tar.gz", followSymlinks: false + sh 'rm -rf _output ; mkdir -p _output' + } catch (Exception e) { } } }