]> Frank Brehm's Git Trees - profitbricks/jenkins-build-scripts.git/commitdiff
add debugging output
authorHolger Levsen <holger@layer-acht.org>
Thu, 20 Sep 2012 11:24:41 +0000 (13:24 +0200)
committerHolger Levsen <holger@layer-acht.org>
Thu, 20 Sep 2012 11:24:41 +0000 (13:24 +0200)
debian_build.py

index 45683a9edbb686c979a6ad0b4be3b1025565de58..dd7f697949ea88064b12df2d63b82b0cd605a454 100755 (executable)
@@ -132,18 +132,22 @@ def db_add_job(con, name):
     try:
         cur.execute("INSERT INTO jenkins_job(name) VALUES(%s)"
                 " RETURNING id", (name))
+        logger_debug("saved %s to databased" %(job_name))
     except psycopg2.DatabaseError as e:
     # record already exist
         cur.execute("ROLLBACK TO a")  # have to rollback after failed command
+        logger_debug("could not save %s to databased" %(job_name))
 
 #def add_package_instance("profitbricks", $BUILD_JOBNAME, $BUILD_NUMBER, changes_file)
 def add_package_instance(origin, job_name, job_id, changes_file, version):
     con = db_connect()
+    logger_debug("save %s to database" %(job_name))
     db_add_job(con, job_name) 
     # add jenkins_build
     # for all packages in changes file
       # add deb_package (if not exist)
       # add deb_package_instance
+    # must not add development builds... or maybe?
 
 def dput_package_upload(changes_path):
     try: