image-creator: Make label more informative
authorEd Bartosh <eduard.bartosh@intel.com>
Mon, 7 Oct 2013 12:26:54 +0000 (15:26 +0300)
committerEd Bartosh <eduard.bartosh@intel.com>
Mon, 7 Oct 2013 12:27:15 +0000 (15:27 +0300)
Label now includes project, build id and image name.

Change-Id: I88a2e27d501d1778f22664c8f619e387b26c3213
Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
jobs/image-creator/config.xml

index 7de4879..9fe34a2 100644 (file)
@@ -55,19 +55,15 @@ python ${WORKSPACE}/jenkins-scripts/job_imager.py</command>
   </builders>
   <publishers>
     <org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder plugin="groovy-postbuild@1.8">
-      <groovyScript>def matcher = manager.getLogMatcher(&quot;.*&lt;name&gt;(.*)&lt;/name&gt;\$&quot;)
+      <groovyScript>def project = manager.getLogMatcher(&apos;.*&quot;project&quot;: &quot;(.*)&quot;.*$&apos;)
+def build = manager.getLogMatcher(&apos;.*&quot;buildid&quot;: &quot;(.*)&quot;.*$&apos;)
+def image = manager.getLogMatcher(&apos;.*&quot;name&quot;: &quot;(.*)&quot;.*$&apos;)
 
-if(matcher?.matches()) {
-    manager.addShortText(matcher.group(1))
-}else{
-    if ( manager.logContains(&quot;Info: Finished.*&quot;)){
-        manager.addBadge(&quot;success.gif&quot;, &quot;&quot;)
-     }else{
-         manager.addBadge(&quot;error.gif&quot;,&quot;&quot;)
-     }
-}</groovyScript>
-      <behavior>0</behavior>
-    </org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder>
+if(project?.matches() &amp;&amp; build?.matches() &amp;&amp; image?.matches() ) {
+    manager.addShortText(project.group(1)+&apos; &apos;+build.group(1)+&apos; &apos;+image.group(1))
+}
+</groovyScript>
+      <behavior>0</behavior>    </org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder>
     <hudson.plugins.ws__cleanup.WsCleanup plugin="ws-cleanup@0.16">
       <patterns>
         <hudson.plugins.ws__cleanup.Pattern>