]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
liveboot: fix: logging liveboot builds to CIDB failed
authorFabian Holler <fabian.holler@profitbricks.com>
Wed, 5 Mar 2014 10:15:12 +0000 (11:15 +0100)
committerFabian Holler <fabian.holler@profitbricks.com>
Wed, 5 Mar 2014 10:21:50 +0000 (11:21 +0100)
db_add_build(..) was called with insufficient parameters, the git_rev_id
parameter was missing

db_add.py

index 029bfe169f4f1cf2f4d826f7d79797fd87eeab08..89245e4720bd8911e804ffe080e376b5209e58a6 100755 (executable)
--- 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