[BuildMonitor] change the method of getting the build_project_id 24/118624/1
authorSungHun Hwang <sh0924.hwang@samsung.com>
Mon, 13 Mar 2017 06:54:42 +0000 (15:54 +0900)
committerSungHun Hwang <sh0924.hwang@samsung.com>
Mon, 13 Mar 2017 09:15:09 +0000 (18:15 +0900)
commit6804204651e8026357536d5f53137e212b17f841
tree3389ddf30ec98619267f5f96514467b9c32dcd17
parentb119148c32d2bed8ef59b36aa6f8871930346b85
[BuildMonitor] change the method of getting the build_project_id

1. change the method of getting the build_project_id
   to prevent getting the wrong build_project_id
   when there are too many jenkins jobs including the 'BUILD-MONITOR' job simultaneously

  [CHAGNED]
  1-1. # get last_bpid_of_build_snapshot
  1-2. # get post_build_project_id
  1-3. # use the prev last_bpid if there is no post_build_project_id (for manual trigger)

2. the query_data in some functions should be changed from 'project' to 'bm_snapshot_name'
   bcz of the above solution

3. clean up some codes
  3-1. replace the query_data from build_id to bm_snapshot_name
       to clarify the meaning of the snapshot name
  3-2. remove unused code

Change-Id: Ia659e8461b6ed0a0c2ad87e178bc96e12c3c1707
Signed-off-by: SungHun Hwang <sh0924.hwang@samsung.com>
job_buildmonitor.py
job_create_snapshot.py
job_post_image.py