From: Junghyun Kim Date: Wed, 25 Jan 2017 07:55:10 +0000 (+0900) Subject: Profile info is sent additionaly to BUILD_MONITOR X-Git-Tag: submit/trunk/20190927.012743~558 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2f376bf30fa6bb63afea14c171f5e899d36a6810;p=services%2Fjenkins-scripts.git Profile info is sent additionaly to BUILD_MONITOR Change-Id: Icafcf23ab492a5eaaa4c0f1af768c075877ebd3d Signed-off-by: Junghyun Kim --- diff --git a/job_buildmonitor.py b/job_buildmonitor.py index b45a8ee..42f3f6c 100644 --- a/job_buildmonitor.py +++ b/job_buildmonitor.py @@ -1145,11 +1145,11 @@ def update_sr_submit_log_completed(git_tag): query_data = (git_tag) buildmonitor_db.do_query(query, query_data) -def update_repa(sr_tag, status, status_reason): - print "[%s] update_repa %s, %s, %s\n", (__file__, sr_tag, status, status_reason) +def update_repa(sr_tag, profile, status, status_reason): + print "[%s] update_repa %s, %s, %s, %s\n", (__file__, sr_tag, profile, status, status_reason) - query = "UPDATE sr_accept_log SET status=%s,status_reason=%s WHERE sr=%s ORDER BY id DESC LIMIT 1" - query_data = (status, status_reason, sr_tag) + query = "UPDATE sr_accept_log SET status=%s,status_reason=%s WHERE sr=%s AND profile=%s ORDER BY id DESC LIMIT 1" + query_data = (status, status_reason, sr_tag, profile) buildmonitor_db.do_query(query, query_data) def update_build_log(content): @@ -2025,10 +2025,11 @@ def main(): elif bm_stage == 'REPA': print '[%s][REPA]\n' % (__file__) sr_tag = content.get("sr_tag") + profile = content.get("profile") status = content.get("status") status_str = content.get("status_reason") - update_repa(sr_tag, status, status_str) + update_repa(sr_tag, profile, status, status_str) elif bm_stage == "UPDATE_BUILD_LOG": print "[%s][UPDATE_BUILD_LOG]\n" % (__file__) diff --git a/job_repa.py b/job_repa.py index 2741301..0a35f60 100644 --- a/job_repa.py +++ b/job_repa.py @@ -18,7 +18,7 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # """ -This code is called by repa webpage +This code is called by repa webpage """ import os @@ -103,7 +103,7 @@ def accept_or_reject(build, prerelease_proj, git_tag, state, comment=''): for p in org_source_packages: if not is_aggregate_package(build, prerelease_proj, p): source_packages.append(p) - + reqid = build.create_sr(prerelease_proj, source_packages, target_prj, message=message) @@ -166,6 +166,7 @@ bm_stage = "REPA" bm_data = {"bm_stage": bm_stage, "sr_tag": sr_tag, + "profile":obs_project, "status": status_str, "status_reason": error_string} trigger_next("BUILD-MONITOR", bm_data)