Gentoo Archives: gentoo-commits

From: Magnus Granberg <zorry@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/tinderbox-cluster:master commit in: buildbot_gentoo_ci/config/
Date: Sat, 30 Jul 2022 22:44:06
Message-Id: 1659221012.457eadb511be7e44744cfa4a91a302614b5d754f.zorry@gentoo
1 commit: 457eadb511be7e44744cfa4a91a302614b5d754f
2 Author: Magnus Granberg <zorry <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jul 30 22:43:32 2022 +0000
4 Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org>
5 CommitDate: Sat Jul 30 22:43:32 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/tinderbox-cluster.git/commit/?id=457eadb5
7
8 Add scheduler_update_db_mr for mr/pr support
9
10 Signed-off-by: Magnus Granberg <zorry <AT> gentoo.org>
11
12 buildbot_gentoo_ci/config/schedulers.py | 19 ++++++++++++++++++-
13 1 file changed, 18 insertions(+), 1 deletion(-)
14
15 diff --git a/buildbot_gentoo_ci/config/schedulers.py b/buildbot_gentoo_ci/config/schedulers.py
16 index 2e5379c..b769f00 100644
17 --- a/buildbot_gentoo_ci/config/schedulers.py
18 +++ b/buildbot_gentoo_ci/config/schedulers.py
19 @@ -39,8 +39,15 @@ def getGitChanges(props):
20 change_data['revision'] = k['revision']
21 change_data['timestamp'] = k['when_timestamp']
22 change_data['branch'] = k['branch']
23 + change_data['project'] = k['project']
24 return change_data
25
26 +def mr_branch_fn(branch):
27 + # if branch end with -mr or -pr
28 + if branch[-3] == '-mr' or branch[-3] == '-pr':
29 + return True
30 + return False
31 +
32 def gentoo_schedulers():
33 scheduler_update_db = schedulers.SingleBranchScheduler(
34 name='scheduler_update_db',
35 @@ -49,7 +56,16 @@ def gentoo_schedulers():
36 change_data = getGitChanges
37 ),
38 builderNames = builderUpdateDbNames,
39 - change_filter=util.ChangeFilter(branch='master'),
40 + change_filter=util.ChangeFilter(branch='master', category='push'),
41 + )
42 + scheduler_update_db_mr= schedulers.SingleBranchScheduler(
43 + name='scheduler_update_db_mr',
44 + treeStableTimer=0,
45 + properties = dict(
46 + change_data = getGitChanges
47 + ),
48 + builderNames = builderUpdateDbNames,
49 + change_filter=util.ChangeFilter(branch_fn=mr_branch_fn, category='merge_request'),
50 )
51 create_stage4 = schedulers.ForceScheduler(
52 name="create_stage4",
53 @@ -86,6 +102,7 @@ def gentoo_schedulers():
54 s = []
55 s.append(create_stage4)
56 s.append(scheduler_update_db)
57 + s.append(scheduler_update_db_mr)
58 s.append(update_repo_check)
59 s.append(update_cpv_data)
60 s.append(update_v_data)