]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
pass an array of package_instance_ids to add_package_instance()
authorHolger Levsen <holger@layer-acht.org>
Wed, 26 Sep 2012 16:13:01 +0000 (18:13 +0200)
committerHolger Levsen <holger@layer-acht.org>
Wed, 26 Sep 2012 16:13:01 +0000 (18:13 +0200)
debian_build.py

index 0d648413b49986977b5262142f88eda9399dfe9c..0ac47858d9a9cd4e72e159bb7904b18e1a9b7b71 100755 (executable)
@@ -695,15 +695,19 @@ if __name__ == '__main__':
     # FIXME: must not add development builds... or maybe?
     # cidb wise, we only care about builds from master, hotfix + develop
     if GIT_BRANCH_NAME == 'master' or GIT_BRANCH_NAME == 'develop' or GIT_BRANCH_NAME.startswith('hotfix/'):
+        package_instances=[]
         try:
-            package_instance_id = add_package_instance("profitbricks", BUILD_JOBNAME, BUILD_NUMBER, changes_file, version, BUILD_START, BUILD_END)
+            package_instances.append(add_package_instance("profitbricks", BUILD_JOBNAME, BUILD_NUMBER, changes_file, version, BUILD_START, BUILD_END))
         except Exception, error:
             cmd = ['figlet-figlet', '-t', 'package instance not added to DB']
             subprocess.check_call(cmd)
             #FIXME: this should really cause an error
             # exit_error()
-        #add_liveboot_request(package_instance_id)
-
+        if len(package_instances) > 0:
+            try:
+                add_liveboot_request(package_instances)
+            except:
+                logger.debug("liveboot request failed")
     # finally
     exit_ok()