CORD-2660 adding generation of test docs to jenkinsfiles

Change-Id: I64086dac0d6b427440eb2c7dda39c33578463825
diff --git a/Jenkinsfile-mcord b/Jenkinsfile-mcord
index d1459f7..f336625 100644
--- a/Jenkinsfile-mcord
+++ b/Jenkinsfile-mcord
@@ -39,7 +39,10 @@
                 cd /opt/cord/build; make collect-diag
                 cd /opt/cord/test/cord-tester/src/test/diag/
                 rm -r Log/ || true
+                rm -r TestDoc/ || true
+                mkdir TestDoc || true
                 pybot -v CORD_PROFILE:${pod_config.cord_profile} -d Log -T verifyCollectDiag.robot
+                python -m robot.testdoc verifyCollectDiag.robot TestDoc/verifyCollectDiag.html
                 """)
             } catch(error) { currentBuild.result = 'FAILURE' }
         }
@@ -50,11 +53,14 @@
                 runHeadNodeCmd("""
                 cd /opt/cord/test/cord-tester/src/test/robot/
                 rm -r Log/ || true
+                rm -r TestDoc/ || true
+                mkdir TestDoc || true
                 """)
                 if (deployment_config.fabric_switches != null) {
                     runHeadNodeCmd("""
                     cd /opt/cord/test/cord-tester/src/test/robot/
                     pybot --exclude notready -v FABRIC:on -v PUBLIC_IFACE:${pod_config.external_iface} -v CORD_PROFILE:${pod_config.cord_profile} -d Log -T SanityPhyPOD.robot
+                    python -m robot.testdoc SanityPhyPOD.robot TestDoc/SanityPhyPOD.html
                     """)
                 }
                 else {
@@ -62,6 +68,7 @@
                     runHeadNodeCmd("""
                     cd /opt/cord/test/cord-tester/src/test/robot/
                     pybot --exclude notready --exclude fabric -v FABRIC:off -v PUBLIC_IFACE:${pod_config.external_iface} -v CORD_PROFILE:${pod_config.cord_profile} -d Log -T SanityPhyPOD.robot
+                    python -m robot.testdoc SanityPhyPOD.robot TestDoc/SanityPhyPOD.html
                     """)
                 }
             } catch(error) { currentBuild.result = 'FAILURE' }
@@ -86,11 +93,13 @@
             scp -r ${deployment_config.head.user}@${deployment_config.head.ip}:/opt/cord/test/cord-tester/src/test/cord-api/Log/* ./RobotLogs || true
             scp -r ${deployment_config.head.user}@${deployment_config.head.ip}:/opt/cord/test/cord-tester/src/test/robot/Log/* ./RobotLogs || true
             scp -r ${deployment_config.head.user}@${deployment_config.head.ip}:/opt/cord/test/cord-tester/src/test/diag/Log/* ./RobotLogs || true
+            scp -r ${deployment_config.head.user}@${deployment_config.head.ip}:/opt/cord/test/cord-tester/src/test/robot/TestDoc/* ./RobotLogs/TestDocs || true
+            scp -r ${deployment_config.head.user}@${deployment_config.head.ip}:/opt/cord/test/cord-tester/src/test/diag/TestDoc/* ./RobotLogs/TestDocs || true
             """
             step([$class: 'RobotPublisher',
                 disableArchiveOutput: false,
                 logFileName: 'RobotLogs/log*.html',
-                otherFiles: '',
+                otherFiles: 'RobotLogs/TestDocs/*.html',
                 outputFileName: 'RobotLogs/output*.xml',
                 outputPath: '.',
                 passThreshold: 100,