From: Fabian Holler Date: Wed, 5 Mar 2014 10:15:12 +0000 (+0100) Subject: liveboot: fix: logging liveboot builds to CIDB failed X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=80d489b32e1077aeb2664dea5c04b02b3aeb9267;p=profitbricks%2Fjenkins-build-scripts.git liveboot: fix: logging liveboot builds to CIDB failed db_add_build(..) was called with insufficient parameters, the git_rev_id parameter was missing --- diff --git a/db_add.py b/db_add.py index 029bfe1..89245e4 100755 --- a/db_add.py +++ b/db_add.py @@ -54,7 +54,7 @@ def db_add_build(con, db_id, number, git_rev_id, start, end, status): cur.execute("ROLLBACK TO a") # have to rollback after failed command logger.debug("INSERT INTO jenkins_build(jenkins_job_id," " git_revision_id, jenkins_build_number, build_start," - " build_end, status) VALUES(%s, %s, %s, %s, '%s')" + " build_end, status) VALUES(%s, %s, %s, %s, %s, '%s')" " RETURNING id" % (db_id, git_rev_id, number, start, end, status)) @@ -222,7 +222,8 @@ def get_liveboot_build_id(job_name, build_number): def add_liveboot_build(job_name, build_number, request_id, start): con = db_connect() db_job_id = db_add_job(con, job_name) - db_build_id = db_add_build(con, db_job_id, build_number, start, 'NULL', 'in progress') + db_build_id = db_add_build(con, db_job_id, build_number, 'NULL', start, + 'NULL', 'in progress') con.commit() logger.info("CIDB init for liveboot OK.") return