fix the problem that trigger order is mixed up 30/138330/1
authorSungHun Hwang <sh0924.hwang@samsung.com>
Tue, 11 Jul 2017 09:07:31 +0000 (18:07 +0900)
committerSungHun Hwang <sh0924.hwang@samsung.com>
Tue, 11 Jul 2017 09:07:31 +0000 (18:07 +0900)
PROBLEM:
  display 'succuss' on dashboard
  but actually the image was not created

REASON:
  the trigger infomation order was mixed up
  between 'pre-release-image-creator' and 'BUILD-MONIOTR' job

SOLUTION:
  1. change the code from 'break' to 'return'
     bcz the rest progress does not need anymore
  2. remove DUMMY code

Change-Id: I898f57a74b97bb6b5f9e11f134c751f4dad9186f
Signed-off-by: SungHun Hwang <sh0924.hwang@samsung.com>
job_imager.py

index e9af3fd..786bc8d 100644 (file)
@@ -235,19 +235,6 @@ def main():
     url = os.path.join(fields.get('url_pub_base', ''),
                        fields['repo_path'], fields['images_path'])
 
-    # Triggering DUMMY post-image-creation
-    data = {"image_xml": "<?xml version=\"1.0\" ?>\n",
-            "name": fields['name'],
-            "project": fields.get('project', ''),
-            "status": "failed",
-            "url": url,
-            "build_id": build_id,
-            "repo": fields['repo'],
-            }
-    if 'download_num' in fields:
-        data['download_num'] = int(fields['download_num'])
-    trigger_next("POST-IMAGE-CREATION", data)
-
     ksf = os.path.join(outdir, '%s.ks' % name)
     with open(ksf, 'w') as ks_fh:
         ks_fh.write(fields["kickstart"])
@@ -336,7 +323,7 @@ def main():
                     if int(H['download_num']) != int(fields['download_num']):
                         print 'DO NOT sync! download_num differs: %s, %s' \
                               % (fields['download_num'], H['download_num'])
-                        break
+                        return
             except Exception, err:
                 print 'Error while reading note! %s' % str(err)
         if sync(sync_src, sync_dest):