cur = con.cursor()
cur.execute("SAVEPOINT a")
try:
- cur.execute("INSERT INTO deb_package_instance(deb_package_id, deb_package_origin_id, jenkins_build_id, version, available) VALUES(%s, %s, %s, '%s', 'true') RETURNING id" % (package_id, origin_id, build_id, version))
+ cur.execute("INSERT INTO deb_package_instance(deb_package_id, deb_package_origin_id, jenkins_build_id, version, available) VALUES(%s, %s, %s, '%s', 'successful') RETURNING id" % (package_id, origin_id, build_id, version))
except psycopg2.DatabaseError as e:
# record already exist - this MUST NOT HAPPEN for jenkins builds
cur.execute("ROLLBACK TO a") # have to rollback after failed command
- logger.error("FAILED: INSERT INTO deb_package_instance(deb_package_id, deb_package_origin_id, jenkins_build_id, version, available) VALUES(%s, %s, %s, '%s', 'true') RETURNING id" % (package_id, origin_id, build_id, version))
+ logger.error("FAILED: INSERT INTO deb_package_instance(deb_package_id, deb_package_origin_id, jenkins_build_id, version, available) VALUES(%s, %s, %s, '%s', 'successful') RETURNING id" % (package_id, origin_id, build_id, version))
exit_error()
return cur.fetchone()[0]
db_job_id = db_add_job(con, job_name)
logger.debug("INSERT success job %s" % job_name)
# maybe FIXME: we could add the build already once its started, but for package builds we dont wanna add failures to the db at all
- db_build_id = db_add_build (con, db_job_id, build_number, start, end, 'true')
+ db_build_id = db_add_build (con, db_job_id, build_number, start, end, 'successful')
logger.debug("INSERT success build number %s" % build_number)
logger.debug("processing %s" %(changes_file))
cmd = ["dcmd", '--deb', changes_file]
def finish_liveboot_build(build_id, start, end):
con = db_connect()
- db_add_build_result (con, build_id, start, end, 'true')
+ db_add_build_result (con, build_id, start, end, 'successful')
con.commit()
logger.info("CIDB update for liveboot OK.")
return