services/obs-event-plugin.git
3 years agoRemove build dependence with python-support 74/245674/1 accepted/tizen_devbase_services devel master accepted/tizen/devbase/services/20201102.013848 submit/trunk/20201029.114030 submit/trunk/20201029.132130 submit/trunk/20201029.140230 submit/trunk/20201030.143530 submit/trunk/20201030.151030
jiankang.fan [Wed, 14 Oct 2020 05:42:46 +0000 (14:42 +0900)]
Remove build dependence with python-support

Change-Id: I84fff031fe4279c10679247369022ebf55089089
Signed-off-by: jiankang.fan <jiankang.fan@samsung.com>
3 years agoRelease 0.1.9 53/236653/1 accepted/tizen/devbase/services/20200623.003307 submit/trunk/20200622.151812
yan11.meng [Fri, 19 Jun 2020 05:18:44 +0000 (13:18 +0800)]
Release 0.1.9

Change-Id: I6f61083336b6d3f27e81d049b760e086d89c214b

4 years agouse dh_python2 instead dh_pysupport for xUbuntu_19.10 84/227284/2 accepted/tizen/devbase/services/20200423.100510 accepted/tizen/devbase/services/20200514.023513 accepted/tizen/devbase/services/20200520.012733 accepted/tizen/devbase/services/20200619.010836 submit/trunk/20200422.115210 submit/trunk/20200422.142510 submit/trunk/20200422.165210 submit/trunk/20200423.102810 submit/trunk/20200423.111223 submit/trunk/20200423.115423 submit/trunk/20200423.122334 submit/trunk/20200513.162810 submit/trunk/20200519.161030 submit/trunk/20200519.164610 submit/trunk/20200519.184310 submit/trunk/20200612.131210 submit/trunk/20200612.155520 submit/trunk/20200618.153020 submit/trunk/20200618.172010 submit/trunk/20200618.182010 submit/trunk/20200619.102030 submit/trunk/20200619.134012
yan11.meng [Wed, 11 Mar 2020 05:30:39 +0000 (14:30 +0900)]
use dh_python2 instead dh_pysupport for xUbuntu_19.10

Change-Id: If67d28b6622e4ef01c3534a1250a3881168bfccc
Signed-off-by: yan11.meng <yan11.meng@samsung.com>
6 years agoEnable zlib compress for the trigger data 11/168911/1 release-20180330 accepted/tizen/devbase/services/20190930.043427 accepted/tizen/devbase/services/20200104.053709 accepted/tizen/devbase/services/20200106.013851 accepted/tizen/devbase/services/20200106.013957 accepted/tizen/devbase/services/20200106.014058 accepted/tizen/devbase/services/20200106.014207 accepted/tizen/devbase/services/20200109.052652 accepted/tizen/devbase/services/20200110.011119 accepted/tizen/devbase/services/20200114.020113 accepted/tizen/devbase/services/20200114.115705 accepted/tizen/devbase/services/20200115.231351 accepted/tizen/devbase/services/20200214.062219 accepted/tizen/devbase/services/20200219.094444 accepted/tizen/devbase/services/20200413.092112 accepted/tizen/devbase/services/20200415.082841 submit/devel/20190730.075419 submit/trunk/20190927.012743 submit/trunk/20190930.011717 submit/trunk/20190930.015203 submit/trunk/20191021.051025 submit/trunk/20191021.061922 submit/trunk/20191021.083710 submit/trunk/20200104.111333 submit/trunk/20200104.134833 submit/trunk/20200104.154833 submit/trunk/20200104.164833 submit/trunk/20200104.173833 submit/trunk/20200105.091709 submit/trunk/20200107.112802 submit/trunk/20200107.162402 submit/trunk/20200107.170902 submit/trunk/20200108.135302 submit/trunk/20200108.172202 submit/trunk/20200108.172702 submit/trunk/20200109.105802 submit/trunk/20200109.112402 submit/trunk/20200109.124502 submit/trunk/20200109.151502 submit/trunk/20200109.154402 submit/trunk/20200110.111659 submit/trunk/20200114.100000 submit/trunk/20200114.110000 submit/trunk/20200115.110101 submit/trunk/20200213.184721 submit/trunk/20200213.191021 submit/trunk/20200214.114520 submit/trunk/20200219.120523 submit/trunk/20200409.194520 submit/trunk/20200409.200220 submit/trunk/20200409.202020 submit/trunk/20200410.143020 submit/trunk/20200410.160020 submit/trunk/20200413.132320 submit/trunk/20200413.150000 submit/trunk/20200413.151000 submit/trunk/20200414.141500 submit/trunk/20200414.191000
Yonghee Han [Mon, 29 Jan 2018 23:28:50 +0000 (08:28 +0900)]
Enable zlib compress for the trigger data

PROBLEM : A lot of data can not be delivered.
SOLUTION : encoding zlib for the data and decoding zlib for the trigger data in robot
Related Commit : jenkins-scripts 95105b40c41def67cb1fbd91d73da2d0e1d00832

Change-Id: Ie9eb639eb7826743c382e85af07bb86fd7081fd4

6 years agoUse insert_or_update_project_info 20/137520/1 release-20170922
Junghyun Kim [Thu, 6 Jul 2017 07:47:27 +0000 (16:47 +0900)]
Use insert_or_update_project_info

PROBLEM:
If we use insert_project_info, same projects can be inserted serveral
times at initialize_projpack_info() which is called when the source
server is restarted.

SOLUTION:
Use insert_or_update_project_info().

Change-Id: Iea47729aff8ebad7ee18aaa1d5d120a0592840d3
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
6 years agoRelease 0.1.8 release-20170522
hyokeun [Mon, 22 May 2017 02:45:27 +0000 (11:45 +0900)]
Release 0.1.8

Change-Id: Ie0c95dbd55804fbc4de32b07a1de0aec179b6e44

6 years agoUpdate reference project name to DB. 21/129421/1
Junghyun Kim [Tue, 16 May 2017 10:07:05 +0000 (19:07 +0900)]
Update reference project name to DB.

Change-Id: I151c47e1f34534da429b31cb3e16b416888ec264
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
6 years agoMerge "Apply another filter for relaying projects" into devel
Junghyun Kim [Tue, 16 May 2017 10:04:43 +0000 (10:04 +0000)]
Merge "Apply another filter for relaying projects" into devel

6 years agoApply another filter for relaying projects 17/128517/1
Junghyun Kim [Wed, 10 May 2017 08:52:48 +0000 (17:52 +0900)]
Apply another filter for relaying projects

Change-Id: I2d7b891f79abcab5e7e4eeac0893216ae9b93b92
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoMerge "ACCEPT is process using REQUEST_STATECHANGE." into devel
Junghyun Kim [Thu, 4 May 2017 00:11:58 +0000 (00:11 +0000)]
Merge "ACCEPT is process using REQUEST_STATECHANGE." into devel

7 years agoACCEPT is process using REQUEST_STATECHANGE. 86/127886/1
Junghyun Kim [Tue, 2 May 2017 06:44:55 +0000 (15:44 +0900)]
ACCEPT is process using REQUEST_STATECHANGE.

PROBLEM: OBS_SRCSRV_REQUEST_ACCEPT event disappears in OBS-2.7
while it was in OBS-2.4.

SOLUTION: use OBS_SRCSRV_REQUEST_STATECHANGE.
In order to this, we have to add two parameters (sourceproject,
targetproject) in the obs source.
The commit titled "Add parameters (sourceproject, targetproject) in
REQUEST_STATECHANGE event." in obs-server-2.7
should be applied altogether.

Change-Id: Ifd51002044b18e4f4845c413b7265aae3bd2caca
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoRelease 0.1.7 release-20170420
hyokeun [Thu, 20 Apr 2017 08:04:20 +0000 (17:04 +0900)]
Release 0.1.7

Change-Id: I84f0ad82482f15ece164189965589d856353f6f6

7 years agoEnable notify without project name 65/126065/1
hyokeun [Thu, 20 Apr 2017 04:39:03 +0000 (13:39 +0900)]
Enable notify without project name

Change-Id: I8e4579ddc39ee46d5f081f0cc28119269f689b2c

7 years agoRelease 0.1.6 release-20170331
SoonKyu Park [Fri, 31 Mar 2017 06:09:04 +0000 (15:09 +0900)]
Release 0.1.6

Change-Id: I009bfd23e2af426e116efed8ff928885fcfcbc9a

7 years agoEnable relaying events even if build_monitor_db_conf is disabled. 13/118113/1
Junghyun Kim [Thu, 9 Mar 2017 00:43:45 +0000 (09:43 +0900)]
Enable relaying events even if build_monitor_db_conf is disabled.

Change-Id: Iabb0fdc21fe4b050db45e0b1fce45a9af8cbca6a
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoRelease 0.1.5 release-20170309
SoonKyu Park [Wed, 8 Mar 2017 07:37:41 +0000 (16:37 +0900)]
Release 0.1.5

Change-Id: I3c3ab2977386b1b90270e9acfb06cdf05fe44925

7 years agoSend trigger reason as string in BUILD_START event when it is relayed.
Junghyun Kim [Fri, 3 Mar 2017 06:05:06 +0000 (15:05 +0900)]
Send trigger reason as string in BUILD_START event when it is relayed.

Change-Id: I78eeb0014f19cfd64453930f7f7ff0e6e50b3ce4
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agobuild_project_start() is called in package_build_status()
Junghyun Kim [Thu, 2 Mar 2017 02:15:07 +0000 (11:15 +0900)]
build_project_start() is called in package_build_status()

PROBLEM: BUILD_BROKEN can be triggered at the first time of the build
project. In this case, build_target_id can be 0 because it is not set.

SOLUTION: build_project_start() is called in package_build_status()

Change-Id: I6ab6ebb754f8486f7b076b0bda8393d0359912b9
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoInclude BuildMonitorDB.pm in the spec file.
Junghyun Kim [Mon, 27 Feb 2017 23:44:38 +0000 (08:44 +0900)]
Include BuildMonitorDB.pm in the spec file.

Change-Id: I4e22125852a823b886760fc0f38f705600cbb9d5
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoDo not send description.
Junghyun Kim [Tue, 21 Feb 2017 02:48:31 +0000 (11:48 +0900)]
Do not send description.

Descriptions can have SEC IP addresses, so do not send them.

Change-Id: I385126e86706a76e8f3024250bf233e69e509d03
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoRelease 0.1.4 release-20170224
SoonKyu Park [Thu, 23 Feb 2017 08:34:07 +0000 (17:34 +0900)]
Release 0.1.4

7 years agoMake build_project_id even for srcsrv_update_project 78/114278/3
Junghyun Kim [Mon, 13 Feb 2017 00:44:13 +0000 (09:44 +0900)]
Make build_project_id even for srcsrv_update_project

PROBLEM:
- We found the case that 'SRCSRV_CREATE_PROJECT' event is missed
- In that case, we cannot make build_project_id for the current
  implementation

SOLUTION:
- make build_project_id if insert_project_id happens for both
  'SRCSRV_CREATE_PROJECT' and 'SRCSRV_UPDATE_PROJECT'

Change-Id: Ie69ae5e338d2890140deea539b3e6b9d55e0e36e
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoDo not use 'test' for config_string. 77/114277/1
Junghyun Kim [Mon, 13 Feb 2017 00:42:51 +0000 (09:42 +0900)]
Do not use 'test' for config_string.

This can affect another projects' build statuses.

Change-Id: I98debba64eee624a8de1e86a50a5fb98352bb707
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoCompensation for BUILD_START, BUILD_SUCCESS, BUILD_UNCHANGED 67/112967/2
Junghyun Kim [Fri, 3 Feb 2017 11:52:05 +0000 (20:52 +0900)]
Compensation for BUILD_START, BUILD_SUCCESS, BUILD_UNCHANGED

PROBLEM:
- Since obs-2.7, all events are gathered to src_server.
- src_server delivers all notify events to plugins
- There is possibility that BUILD_SUCCESS has been processed before
  BUILD_START is processed.

SOLUTION:
- For BUILD_SUCCESS, BUILD_FAILED and BUILD_UNCHANGED,
  it is recorded even if there is no row for this build.
- For BUILD_START, it updates to prior BUILD_SUCCESS data
  if time is prior to the time of BUILD_SUCCESS.

Change-Id: Ifcc48504e23679ee3a9518f37f1ea21f35237020
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoRelease 0.1.3 release-20170206
SoonKyu Park [Sat, 4 Feb 2017 07:19:57 +0000 (16:19 +0900)]
Release 0.1.3

Change-Id: I76d6b178ce375514986bdd648dae5feb9c122b0f

7 years agoBUGFIX: sql statement typo.
Junghyun Kim [Wed, 25 Jan 2017 01:35:19 +0000 (10:35 +0900)]
BUGFIX: sql statement typo.

Change-Id: Ic1f0695a637df2137f056cf139a9b5b97eddd947
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoExclude unnecessary projects from relaying events and logging
Junghyun Kim [Tue, 24 Jan 2017 02:21:24 +0000 (11:21 +0900)]
Exclude unnecessary projects from relaying events and logging

Change-Id: I2d07c34ac78af486b537d6f3dc9963fcbd11fd43
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoLOCATION_CHANGE: build_monitor_db.conf.template
Junghyun Kim [Wed, 18 Jan 2017 07:15:06 +0000 (16:15 +0900)]
LOCATION_CHANGE: build_monitor_db.conf.template

build_monitor_db.conf.template file is moved from /usr/lib/obs/server/
to /usr/lib/obs/server/plugins.
This is because BuildMonitorDB.pm has been moved before.
(/usr/lib/obs/server -> /usr/lib/obs/server/plugins)
And build_monitor_db.conf.template is related to only BuildMonitorDB.pm

Change-Id: I45110a441fa5b2a5ab1a5e7437534799b0cf90ed
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoBUGFIX: use next instead of continue.
Junghyun Kim [Wed, 18 Jan 2017 01:43:33 +0000 (10:43 +0900)]
BUGFIX: use next instead of continue.

Change-Id: Iee79f020a8be9fb7844318cc5fcf2360807d204f
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoBUGFIX: return 1 if the package is found in the project.
Junghyun Kim [Tue, 17 Jan 2017 06:01:17 +0000 (15:01 +0900)]
BUGFIX: return 1 if the package is found in the project.

Change-Id: Id134d7b0fbe84a52c6ea3cf4bfa74f5a2d4836e2
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agobuild_log_url is generated at the BUILD_START event
Junghyun Kim [Fri, 13 Jan 2017 01:42:09 +0000 (10:42 +0900)]
build_log_url is generated at the BUILD_START event

Change-Id: I79c97244f7eddf450ecc2c67f6a96940db701592
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years ago add debian package
shuai.fu [Sat, 22 Oct 2016 08:21:46 +0000 (16:21 +0800)]
 add debian package

Change-Id: I20b60bea4fe5416a96ee2b0efe4b1d90fc486508
Signed-off-by: shuai.fu <shuai01.fu@samsung.com>
7 years agoDo not relay events for specific projects
Junghyun Kim [Wed, 11 Jan 2017 07:39:20 +0000 (16:39 +0900)]
Do not relay events for specific projects

Squashed commit of the following:

commit 9928775444837d9a0d8648d480d7889cf098b051
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Wed Jan 11 16:37:07 2017 +0900

    Remove trailing white spaces.

    RPC error captured.

    Change-Id: I8d874d30b8ed7c581e3ecf6aac6dc68f0552aa72
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit 745850b103bd4243eeadc5555af21cfaaa4df2a6
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Tue Jan 10 17:56:59 2017 +0900

    Do not relay events for projects that have specific pattern.

    This is required for TRBS OBS not to relay projects
    that have the same name as in Public OBS.

    Not to relay events for such projects,
    insert the below string to BSConfig.pm

    our $exclude_relay_projects_pattern = ("Tizen:Mobile", "Tizen:3.0:Mobile");

    Change-Id: Ib2b617e54db7919fbeb99d9b077926d8c7534673
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
Change-Id: Ie6af7c42dfe36c92b7cd944b027a6f10472e080e
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoBUGFIX: notify_type is sent via POST data
Junghyun Kim [Fri, 6 Jan 2017 03:48:42 +0000 (12:48 +0900)]
BUGFIX: notify_type is sent via POST data

Log is added for relaying events.

Change-Id: I2e4a620fd12769c2e4d1fc506596897a9d2c94b1
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoSquashed commit of the following: 83/107783/1 release-20161231
Junghyun Kim [Fri, 30 Dec 2016 01:35:32 +0000 (10:35 +0900)]
Squashed commit of the following:

Major changes
- Relaying events (SPIN->public) is implemented.

commit 3746a88e237eeacbc231517768c18e2629ab0927
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Thu Dec 29 16:11:13 2016 +0900

    FIX: Method of triggerinf OBS_REPO_PUBLISHED

    Change-Id: I8a12d8d4205bc33877b9e41b78b23b8c64e9a44d
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit a153463691d5d78d6f6b613dd244694b0f0ab25f
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Thu Dec 29 15:13:15 2016 +0900

    Implement notification relay event.

    This is required to communicate (SPIN -> public)

    Change-Id: I3d62d30749f8a208860a69abdf5f3530314c2507
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit f9c0e50e14915695ad62a3f5e276ea988dd467d6
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Thu Dec 29 14:01:09 2016 +0900

    FIX: typo.

    Change-Id: I03e2900a239fa19ca23db60edbf06451abda35cd
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit 3e5aa0d328811fcdf11b2311a582c7573d17e617
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Thu Dec 29 13:49:50 2016 +0900

    update SUCCEEDED in DB after build_target_id is generated for aggregate packages.

    Change-Id: Ie13914e8595ee3fefd720d3319951129501fd88c
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit fb8b4668d3037f16a5e52f7f1349f8ac9fe0f9e3
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Thu Dec 29 10:31:28 2016 +0900

    Make failed detail log to be less than 100 characters.

    Change-Id: Ib5c6201b5e3014f1d2ea95eeb7067639f20fb27f
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit c1b4bafacee796197502374b54a0f59eebb7b0ca
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Thu Dec 29 10:29:54 2016 +0900

    Add feature [relay_src_server]

    PROBLEM:
    - We have two different obs services: public/SPIN
    - The database for both obs services should be merged.

    SOLUTION:
    - the source server's notification feature is relayed to public.

    Change-Id: I8a5fe775ac3bb056155e44c4f9aff16c0ecafd46
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
Change-Id: I772282a61d65668fffe35208c6af54945fbc41eb
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agoThe first merged version of buildmonitor. 94/107194/1
Junghyun Kim [Tue, 27 Dec 2016 06:13:38 +0000 (15:13 +0900)]
The first merged version of buildmonitor.

1. notify_trbs.pm and notify_buildmonitor.pm is merged into notify_buildmonitor.pm
2. BuildMonitorDB.pm is moved from obs to obs-event-plugin
   This is because it is a common module for obs 2.4 and obs 2.7
3. BUILD_EXCLUDED, BUILD_DISABLED, SRCSRV_COMMIT, BUILD_KILL event is added.

Squashed commit of the following:

commit 86103cf5be96b2a2feb6caf9d0e687db295e797d
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Tue Dec 27 15:05:43 2016 +0900

    Logic for triggering make_dep_graph is changed

    - When a package that is not a linked package begins to be built,
      make_dep_graph job is triggered for prerelease/trbs projects.
    - For main projects (e.g., Tizen:Mobile), make_dep_graph is triggered
      when an SR is accepted.

    Change-Id: Ie39473467b87329e7eb6667ac18b95e7e517eb1b
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit 6ffb8eea3c00edf357ba703bdcde0d66f950f533
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Tue Dec 27 11:30:29 2016 +0900

    BUGFIX: build_project status is changed to C for BUILD_EXCLUDED

    PROBLEM:
    There are some bugs that build_project status is not changed to C
    Because multiple schedulers are trying to write C or F simultaneously.

    SOLUTION:
    - To prevent this, I added check code that change to the status only
      if the new status is different from previous status.

    Change-Id: Ia614374143439292730767dbd54234f8a48c55a1
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit d55e6a15672622d48793cd72ab45de7836f02f90
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Tue Dec 27 09:19:59 2016 +0900

    BUILD_EXCLUDED and BUILD_DISABLED is added.

    - BUILD_EXCLUDED and BUILD_DISABLED events are processed now.
    - make_dep_graph is triggered when the package build trigger reason is 'source change()'

    Change-Id: I832771fc1e974ed93ed89183f1c2117b994be1e0
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit 5bc501784f62c0458ba069d8b12717edef2f7165
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Thu Dec 22 18:41:10 2016 +0900

    The method finding repo/arch is changed.

    PROBLEM:
    - Previous implementation was to search local directories.
    - In OBS 2.7, src_server can be located in different server
      compared to other services (scheduler, publisher, repserver...)
    - Hence, local directory searching cannot be a solution for this.

    SOLUTION:
    - Use src_server RPC mechanism to find repo/arch.

    Change-Id: I58f24ad98c6814d7a9b87e6f2ee12ced0df59254
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit aed822861e0ff43c31b41f9d00da186072934e0c
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Thu Dec 22 10:10:38 2016 +0900

    SRCSRV_COMMIT event handler is added.

    PROBLEM:
    - Previously, make_dep_graph is triggered only when
      the project is started to build.
    - For group submissions, make_dep_graph should be
      triggered once more even if the building is in progress.

    SOLUTION:
    - To do this, I decided to use SRCSRV_COMMIT.
    - SRCSRV_COMMIT is triggered when _service file is updated.
    - Using this, make_dep_graph is triggered
      everytime _service file is updated.

    Change-Id: Ia4a90f302f6c16db13c955424a9a18ce581bc3eb
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit 2c8f38f97aed1caeea3685c194d409972699ce8b
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Thu Dec 22 10:02:49 2016 +0900

    notify_trbs.pm and notify_buildmonitor.pm is merged.

    Change-Id: I800d3dcd9cdcd469b53eb4fd33ac3cb4dbe8e176
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit 5f25a94e04ed253f25551f62c43a53209bace4e3
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Thu Dec 22 09:59:08 2016 +0900

    BuildMonitorDB.pm is added into obs-plugins.

    There is no difference in implementation of BuildMonitorDB.pm
    between OBS 2.4 and OBS 2.7.
    Hence, it is moved to plugins directory.

    notify_buildmonitor.pm and notify_trbs.pm will be merged
    into a single file.

    Change-Id: Ie14f8e7ef7924a107188248a7923cf4f8056658a
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit 0d5c8a72c795fdd22813506b704edc09009fd410
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Wed Dec 14 14:28:12 2016 +0900

    aggregate packages are stored into DB after 10 seconds.

    There are some cases that BUILD_SUCCESS is performed before
    BUILD_START for aggregate packages. It is because the build
    time of these packages are less than one second.

    Change-Id: Ibb55268f0d27475fe447c7700afba1f2a3797d2d
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit 55fc99577052d55fe5596f4faac8a0b921a92cc7
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Thu Dec 8 18:50:55 2016 +0900

    sync buildmonitor with trbs.

    Change-Id: I30f9de06db028c2a1ddde3565e9b555679267661
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit 3605ee1fbd573a93c16d01d75011498402902d19
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Wed Dec 7 17:44:52 2016 +0900

    BUILD_KILL event is added.

    Change-Id: If7bf7acf40aa6ae8add36f9cb8839c4e420c2f55
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit 8229cbb501021eac0dabbe65b1b8616a3fab88cd
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Fri Dec 2 16:54:56 2016 +0900

    Time information is used from OBS.

    In previous implementation, the time when we insert data to DB is used.
    From now on, we use the time from OBS events.

    Change-Id: Id40594251d530121c6bac9aef55b5ced203af950

Change-Id: If5eaa95b89f5f0f2b373da45389f452992fcddbb

7 years agoPackage build time is parsed well now. 57/99457/1
Junghyun Kim [Wed, 23 Nov 2016 02:40:02 +0000 (11:40 +0900)]
Package build time is parsed well now.

The page build time was parsed in BuildMonitorDB.pm in src_server.

Since srcserver is located in a different machine compared to repserver,
we should move the parse process to repserver.
It is not viable to parse _statistics in plugin/notify_build_monitor of srcserver.

Change-Id: Id43bc9eeb2febae678fd23a30b9512d7b1859b02
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agonotify_trbs is added. 03/98803/1
Junghyun Kim [Mon, 21 Nov 2016 02:28:40 +0000 (11:28 +0900)]
notify_trbs is added.

Squashed commit of the following:

commit 1df40c96b6b4d5ab65c2c6adc5d94bf2aeca2679
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Mon Nov 21 11:27:00 2016 +0900

    notify_trbs added.

    Change-Id: Ica3f85f33f34b6ec33611eaf2054c65bf6861401
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit 05c16aaf29841d4ff5773cba991e668fa8fe2763
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Thu Nov 3 16:39:13 2016 +0900

    build_dep_graph trigger routine is added.

    Change-Id: I8e9f850f5b1352218fe089f5dc6ce1543f0c73a1
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit d120537f672c9c8a7643ccf027d3b7e799656523
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Tue Nov 1 14:45:51 2016 +0900

    FIXED: typo

    Change-Id: Ia4653c6aaa1f3ca6962bbbf37dd44828fbe71789
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit e9d38f719a5f354e0fa4dd60027d753834a88dfc
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Tue Nov 1 14:42:50 2016 +0900

    comments.

    Change-Id: Ib51433399588df4e64974408e05060ef43193d46
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit c1d04df1209d4a1d483fd0e4db217af6564b27c0
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Tue Nov 1 14:35:42 2016 +0900

    db_conf file name changed.

    Change-Id: Ia60586b2e2cd927ce48576fe64a41e2dfe47806e
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit e651ad31075bd0fc320bce04d7d19635f6d201c0
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Tue Nov 1 13:42:40 2016 +0900

    Module name changed (TerminiDB -> BuildMonitorDB)

    Change-Id: Iefff0ddde18c6b7cd95db6274ae0e5c058aa630c
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit a821ea82932f7de5a540a80706e9afa79f58c8bf
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Tue Oct 25 08:24:19 2016 +0900

    build_project table is owned by OBS from now on.

    Change-Id: I8dedc64537f2fb4c2bb80a77d05e04d30f55e5da
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
Change-Id: Ic205ac3194366f8812b44c18aaf659eb42b04aa4
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agonotify_buildmonitor.pm is updated from sandbox/jh0822kim/buildmonitor. 62/94762/3
Junghyun Kim [Tue, 1 Nov 2016 05:44:24 +0000 (14:44 +0900)]
notify_buildmonitor.pm is updated from sandbox/jh0822kim/buildmonitor.

Squashed commit of the following:

FIXED: typo.

commit e9d38f719a5f354e0fa4dd60027d753834a88dfc
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Tue Nov 1 14:42:50 2016 +0900

    comments.

    Change-Id: Ib51433399588df4e64974408e05060ef43193d46
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit c1d04df1209d4a1d483fd0e4db217af6564b27c0
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Tue Nov 1 14:35:42 2016 +0900

    db_conf file name changed.

    Change-Id: Ia60586b2e2cd927ce48576fe64a41e2dfe47806e
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit e651ad31075bd0fc320bce04d7d19635f6d201c0
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Tue Nov 1 13:42:40 2016 +0900

    Module name changed (TerminiDB -> BuildMonitorDB)

    Change-Id: Iefff0ddde18c6b7cd95db6274ae0e5c058aa630c
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
commit a821ea82932f7de5a540a80706e9afa79f58c8bf
Author: Junghyun Kim <jh0822.kim@samsung.com>
Date:   Tue Oct 25 08:24:19 2016 +0900

    build_project table is owned by OBS from now on.

    Change-Id: I8dedc64537f2fb4c2bb80a77d05e04d30f55e5da
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
Change-Id: I4f06467e58f2fabb8ce2e554c1972879a0ae364e
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agotypo. 08/93408/1
Junghyun Kim [Mon, 24 Oct 2016 02:57:45 +0000 (11:57 +0900)]
typo.

Change-Id: I55bdffeae448cfdaa46bef1fa56f9e3730cdd9a1
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
7 years agonotify_buildmonitor.pm is added. 47/93247/1
Junghyun Kim [Fri, 21 Oct 2016 07:45:02 +0000 (16:45 +0900)]
notify_buildmonitor.pm is added.

You need to set BSConfig.pm like below:

our $notification_plugin = "notify_jenkins notify_termini";
our $build_monitor_db_conf = "/usr/lib/obs/server/build_monitor_db.conf";

if $build_monitor_db_conf is not defined, notify_buildmonitor.pm is disabled.

Change-Id: Ifc88b6ce49a2fd99854a866ad9cd91e74acd283c
Signed-off-by: Junghyun Kim <jh0822.kim@samsung.com>
9 years agoRemove dependency to obs-server release-0.1 release-0.1.1
Ed Bartosh [Mon, 16 Feb 2015 20:40:57 +0000 (22:40 +0200)]
Remove dependency to obs-server

This is done to avoid installation failures like this:
  Problem: nothing provides obs-server needed by
  obs-event-plugin-0.1.1-25.1.noarch

Another way to solve it is to add OBS repositories to
.extra-repos for all packages in Services repo. However,
this seems to be even worse than removing dependency to
obs-server.

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
9 years agoGet rid of perl warnings that polluted src_server.log:
Olev Kartau [Mon, 6 Oct 2014 18:59:49 +0000 (21:59 +0300)]
Get rid of perl warnings that polluted src_server.log:

defined(@array) is deprecated at notify_jenkins.pm line 85.
defined(@array) is deprecated at notify_jenkins.pm line 90.

Indeed, checking for array defined is incorrect as it checks
for scalar integer instead of "array not empty" as we want.

Change-Id: Ib2d8078a455767de8deade30047769222268d061

10 years agoRelease 0.1.1 0.1.1
Ed Bartosh [Wed, 16 Oct 2013 13:25:42 +0000 (16:25 +0300)]
Release 0.1.1

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
10 years agoFixed build creation issue
Ed Bartosh [Tue, 24 Sep 2013 20:52:21 +0000 (23:52 +0300)]
Fixed build creation issue

Current code caused this Jenkins error:

   Form post required [Jenkins]

   You must use POST method to trigger builds. (From scripts you may
   instead pass a per-project authentication token, or authenticate with
   your API token.)

Fixed it by using POST instead of GET HTTP request.

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
10 years agoRelease 0.1.0 0.1.0
Ed Bartosh [Tue, 15 Oct 2013 16:36:18 +0000 (19:36 +0300)]
Release 0.1.0

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
10 years agoFixed bug in passing 'project' to jenkins job
Ed Bartosh [Wed, 2 Oct 2013 15:40:21 +0000 (18:40 +0300)]
Fixed bug in passing 'project' to jenkins job

project variable is properly set, but was not used in the code. The
result is that project is not passed to jenkins job and some events have
not been processed because of that.

Here is example of this issue taken from production log:
notify: trigger Jenkins uri=[http://user:pass@host:8080/robot/job/obs-event-dispatcher/buildWithParameters]
para=[project= event_type=OBS_SRCSRV_REQUEST_ACCEPTED para=...

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
10 years agoAdded .extra-repos with OBS repositories
Ed Bartosh [Wed, 2 Oct 2013 16:01:18 +0000 (19:01 +0300)]
Added .extra-repos with OBS repositories

Providing OBS repositories to OTC Tools Tester to be able to install OBS
during installation check.

Signed-off-by: Ed Bartosh <eduard.bartosh@intel.com>
10 years agoFix packaging issue release-0.0.1
Hasan Wan [Mon, 8 Jul 2013 02:56:15 +0000 (10:56 +0800)]
Fix packaging issue

Signed-off-by: hwan <hwan@owl.bj.intel.com>
11 years agoImplement more flexible event filtering for Jenkins trigger
Olev Kartau [Mon, 15 Apr 2013 09:17:55 +0000 (12:17 +0300)]
Implement more flexible event filtering for Jenkins trigger

Regexps can be configured that control which events do
cause Jenkins trigger and which are ignored.
Note that regexp can have multiple parts which
need to be in alphabetical order, because filter code
composes one string from all hash parts and makes
single regexp comparison.

Change-Id: I1534e3a8d8e5511fdffeb2ffef21821ea1d08fa6

11 years agoOBS plugin to trigger jenkins jobs
Hasan Wan [Tue, 20 Nov 2012 02:48:16 +0000 (10:48 +0800)]
OBS plugin to trigger jenkins jobs

Change-Id: Ifd0d9aede1252b6db5295578020fc9c0fcebab8f
Signed-off-by: Hasan Wan <hasan.wan@intel.com>