[doctor] archive functest log after suite test 11/22411/4
authorRyota MIBU <r-mibu@cq.jp.nec.com>
Sat, 24 Sep 2016 12:56:40 +0000 (21:56 +0900)
committerRyota MIBU <r-mibu@cq.jp.nec.com>
Tue, 27 Sep 2016 17:02:30 +0000 (02:02 +0900)
By using 'postbuildscript', functest suite log will be captured after
a job execution even though the job failed.

Change-Id: I3102a6973d696fb74b6c244028fd8c57c59fbc6a
Signed-off-by: Ryota MIBU <r-mibu@cq.jp.nec.com>
jjb/doctor/doctor.yml

index f93ac9b..4958ca2 100644 (file)
               TESTCASE_OPTIONS=-e INSPECTOR_TYPE=congress -v $WORKSPACE:$HOME/opnfv/repos/doctor
             block: true
             same-node: true
+
+    publishers:
+        - postbuildscript:
+            builders:
+                - functest-copy-suite-log:
+                    suite: '{project}'
+        - archive:
+            artifacts: '{project}.log'
+
+- builder:
+    name: functest-copy-suite-log
+    builders:
         - shell: |
-            logfile=$HOME/opnfv/functest/results/{stream}/doctor.log
-            echo
-            echo "[$logfile]"
-            echo
-            [ -e $logfile ] && cat $logfile
+            cp $HOME/opnfv/functest/results/${{GIT_BRANCH##*/}}/{suite}.log $WORKSPACE/