db_add_package_instance (con, db_package_id, db_origin_id, db_build_id, version)
logger.debug("INSERT success package version %s %s" %( package,version))
#logger.debug('Cmd returned with status %d' %(cmdobj.returncode))
- # FIXME: must not add development builds... or maybe?
- # cidb wise, we only care about builds from master
- #if GIT_BRANCH_NAME == 'master' or GIT_BRANCH_NAME.startswith('hotfix/'):
con.commit()
logger.info("CIDB update OK.")
cmd = ['figlet-figlet', '-t', 'Success!!!']
subprocess.check_call(cmd)
BUILD_END = datetime.datetime.now()
- try:
- 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()
+ # 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/'):
+ try:
+ 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()
# finally
exit_ok()