if jira_key_id > 0: #update
- query = "UPDATE %s SET status = \"%s\" WHERE jira_key = " % (table, item['status']) + "%s"
- query_data = (item['status'],)
+ query = "UPDATE %s SET status = \"%s\" WHERE jira_key = " % (table, item['status']) + "%s"
+ query_data = (item['jira_key'],)
do_query(query, query_data)
print "commit_id : ", commit_id
if commit_id > 0: #update
- query = "UPDATE %s SET test_status = \"%s\" WHERE commit_id = " % (table, item['commit_id']) + "%s"
- query_data = (item['test_status'],)
+ query = "UPDATE %s SET test_status = \"%s\" WHERE commit_id = " % (table, item['test_status']) + "%s"
+ query_data = (item['commit_id'],)
do_query(query, query_data)
f = open( 'file0', 'r')
str1 = subprocess.check_output('pwd')
- print str1
RAW = unicode_to_str(json.loads(f.read()))
f.close()
print "RAW = %s" % RAW
JENKINS_SESSION = requests.Session()
JENKINS_SESSION.trust_env = False
JENKINS['item'] = []
- url = os.getenv(type + '_URL')
+ url = os.getenv(type + '_URL')
print '[INFO] JENKINS url : ', url, '\n'
headers = { 'content-type' : 'application/json', 'Accept-Charset' : 'UTF-8' }
data_url = url + '/job/' + job_name + '/' + build_number + '/api/json?pretty=true'
JIRA = {}
JIRA['item'] = []
SEND = {}
-
+
# get data in spin jira
sender.get_jira_data(JIRA, SEND, 'SPIN_JIRA', os.getenv("SPIN_JIRA_USER"), os.getenv("SPIN_JIRA_PW"))
- # get data in spin jira
- #sender.get_jira_data(JIRA, SEND, 'PUBLIC_JIRA', os.getenv("PUBLIC_JIRA_USER"), os.getenv("PUBLIC_JIRA_PW"))
+ # get data in dev jira
+ sender.get_jira_data(JIRA, SEND, 'PUBLIC_JIRA', os.getenv("PUBLIC_JIRA_USER"), os.getenv("PUBLIC_JIRA_PW"))
sender.send_data(CONFIG, SEND)