From: Holger Levsen Date: Wed, 26 Sep 2012 16:13:01 +0000 (+0200) Subject: pass an array of package_instance_ids to add_package_instance() X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=3f38dc80c7800271b9aeceffd6f732e2357e9abd;p=profitbricks%2Fjenkins-build-scripts.git pass an array of package_instance_ids to add_package_instance() --- 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()