Fix for job status and additional store of env
authorIgor Stoppa <igor.stoppa@intel.com>
Fri, 16 Jan 2015 17:56:39 +0000 (19:56 +0200)
committerXu Chang <changx.xu@intel.com>
Tue, 20 Jan 2015 09:21:03 +0000 (17:21 +0800)
Success = Test is executed succesfully
Unstable = Either some test fails or the build is not supported
Fail = Any other case (Test fails, image unvailable, other errors)

Add, for debuggign purposes, the environment file produced by the job.

Change-Id: If4d473cdde982c3831dcd31b472d9ca7307ea751

jobs/image-tester/config.xml

index 0f1ecf2..c62bdd8 100644 (file)
@@ -10,6 +10,9 @@
   </logRotator>
   <keepDependencies>false</keepDependencies>
   <properties>
+    <hudson.plugins.buildblocker.BuildBlockerProperty plugin="build-blocker-plugin@1.4.1">
+      <useBuildBlocker>false</useBuildBlocker>
+    </hudson.plugins.buildblocker.BuildBlockerProperty>
     <hudson.queueSorter.PrioritySorterJobProperty plugin="PrioritySorter@2.8">
       <priority>100</priority>
     </hudson.queueSorter.PrioritySorterJobProperty>
@@ -44,9 +47,7 @@
   <builders>
     <hudson.tasks.Shell>
       <command>#/bin/bash
-
-python ${WORKSPACE}/jenkins-scripts/job_test_build.py
-</command>
+python ${WORKSPACE}/jenkins-scripts/job_test_build.py</command>
     </hudson.tasks.Shell>
     <EnvInjectBuilder plugin="envinject@1.90">
       <info>
@@ -56,22 +57,32 @@ python ${WORKSPACE}/jenkins-scripts/job_test_build.py
   </builders>
   <publishers>
     <hudson.tasks.ArtifactArchiver>
-      <artifacts>**/results.tar.gz, **/results.xml, **/aft.log, **/tester.log</artifacts>
-      <latestOnly>false</latestOnly>
+      <artifacts>**/results.tar.gz, **/results.xml, **/aft.log, **/tester.log, **/*.ENV</artifacts>
       <allowEmptyArchive>true</allowEmptyArchive>
+      <onlyIfSuccessful>false</onlyIfSuccessful>
+      <fingerprint>false</fingerprint>
+      <defaultExcludes>true</defaultExcludes>
     </hudson.tasks.ArtifactArchiver>
     <org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder plugin="groovy-postbuild@1.8">
       <groovyScript>def run = Thread.currentThread().executable
 def en = run.getEnvironment()
-manager.addShortText(&quot;Image &quot; + en[&quot;IMAGE&quot;] + &quot; - &quot; + en[&quot;TEST_RESULT&quot;])
-if (en[&quot;TEST_RESULT&quot;] != &quot;PASS&quot;)
+if (en[&quot;IMAGE&quot;] != &quot;&quot;)
+    manager.addShortText(&quot;Image &quot; + en[&quot;IMAGE&quot;] + &quot; - &quot; + en[&quot;TEST_RESULT&quot;])
+else
+    manager.addShortText(en[&quot;TEST_RESULT&quot;])
+if (en[&quot;TEST_RESULT&quot;] == &quot;PASS&quot;)
+    manager.buildSuccess()
+else if (en[&quot;TEST_RESULT&quot;] == &quot;IMAGE_NOT_SUPPORTED&quot;)
+    manager.buildUnstable()
+else
     manager.buildFailure()</groovyScript>
       <behavior>0</behavior>
     </org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder>
-    <hudson.tasks.junit.JUnitResultArchiver>
+    <hudson.tasks.junit.JUnitResultArchiver plugin="junit@1.0">
       <testResults>**/results.xml</testResults>
       <keepLongStdio>false</keepLongStdio>
       <testDataPublishers/>
+      <healthScaleFactor>1.0</healthScaleFactor>
     </hudson.tasks.junit.JUnitResultArchiver>
     <hudson.plugins.parameterizedtrigger.BuildTrigger plugin="parameterized-trigger@2.25">
       <configs>
@@ -84,7 +95,7 @@ if (en[&quot;TEST_RESULT&quot;] != &quot;PASS&quot;)
               <onlyExactRuns>false</onlyExactRuns>
             </hudson.plugins.parameterizedtrigger.FileBuildParameters>
           </configs>
-          <projects>test-results-publisher, </projects>
+          <projects>test-results-publisher,</projects>
           <condition>ALWAYS</condition>
           <triggerWithNoParameters>false</triggerWithNoParameters>
         </hudson.plugins.parameterizedtrigger.BuildTriggerConfig>