Store test results on host
Change-Id: Ib0e298462221f1dc6dbef98a8ff4472d3092f0e2
diff --git a/mk-k8s-simple-deploy-pipeline.groovy b/mk-k8s-simple-deploy-pipeline.groovy
index 37aa245..e84e153 100644
--- a/mk-k8s-simple-deploy-pipeline.groovy
+++ b/mk-k8s-simple-deploy-pipeline.groovy
@@ -29,6 +29,7 @@
salt = new com.mirantis.mk.Salt()
orchestrate = new com.mirantis.mk.Orchestrate()
test = new com.mirantis.mk.Test()
+artifacts_dir = "_artifacts"
node {
@@ -97,6 +98,21 @@
stage("Copy k8s e2e test output to config node ") {
test.copyTestsOutput(saltMaster,CONFORMANCE_IMAGE)
}
+
+ stage("Copy k8s e2e test output to host ") {
+ sh '''
+ mkdir ${env.WORKSPACE}/${artifacts_dir}
+ '''
+ try {
+ test.catTestsOutput(saltMaster,CONFORMANCE_IMAGE) >> ${env.WORKSPACE}/${artifacts_dir}/$CONFORMANCE_IMAGE
+ } catch (InterruptedException x) {
+ echo "The job was aborted"
+ } finally {
+ archiveArtifacts allowEmptyArchive: true, artifacts: '_artifacts/*', excludes: null
+ junit keepLongStdio: true, testResults: '_artifacts/**.xml'
+ sh "sudo chown -R jenkins:jenkins ${env.WORKSPACE}"
+
+ }
}
if (HEAT_STACK_DELETE == "1") {