cur = con.cursor()
cur.execute("SAVEPOINT a")
try:
- cur.execute("INSERT INTO jenkins_job(name) VALUES(%s)")
- logger.debug("saved %s to databased" %(job_name))
+ cur.execute("INSERT INTO jenkins_job(name) VALUES('%s')" % name)
+ logger.debug("saved %s to databased" %(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))
+ logger.debug("could not save %s to databased" %(name))
#def add_package_instance("profitbricks", $BUILD_JOBNAME, $BUILD_NUMBER, changes_file)
def add_package_instance(origin, job_name, job_id, changes_file, version):