From 3f38dc80c7800271b9aeceffd6f732e2357e9abd Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Wed, 26 Sep 2012 18:13:01 +0200 Subject: [PATCH] pass an array of package_instance_ids to add_package_instance() --- debian_build.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/debian_build.py b/debian_build.py index 0d64841..0ac4785 100755 --- a/debian_build.py +++ b/debian_build.py @@ -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() -- 2.39.5