[buildbot] phase1: make scheduler and changesource branch-aware
LEDE Commits
lede-commits at lists.infradead.org
Mon May 15 08:39:24 PDT 2023
ynezz pushed a commit to buildbot.git, branch master:
https://git.openwrt.org/51820dfa52d4be1e13ee0f5587c17ebe0a6dc306
commit 51820dfa52d4be1e13ee0f5587c17ebe0a6dc306
Author: Thibaut VARÈNE <hacks at slashdirt.org>
AuthorDate: Mon Oct 24 17:09:43 2022 +0200
phase1: make scheduler and changesource branch-aware
The ForcedScheduler for tags still needs work
Signed-off-by: Thibaut VARÈNE <hacks at slashdirt.org>
---
phase1/master.cfg | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/phase1/master.cfg b/phase1/master.cfg
index b4958b9..afc93ce 100644
--- a/phase1/master.cfg
+++ b/phase1/master.cfg
@@ -15,7 +15,6 @@ from twisted.python import log
from buildbot import locks
from buildbot.data import resultspec
-from buildbot.changes import filter
from buildbot.changes.gitpoller import GitPoller
from buildbot.config import BuilderConfig
from buildbot.plugins import reporters
@@ -27,7 +26,7 @@ from buildbot.process import results
from buildbot.process.factory import BuildFactory
from buildbot.process.properties import Interpolate
from buildbot.process.properties import Property
-from buildbot.schedulers.basic import SingleBranchScheduler
+from buildbot.schedulers.basic import AnyBranchScheduler
from buildbot.schedulers.forcesched import BaseParameter
from buildbot.schedulers.forcesched import ForceScheduler
from buildbot.schedulers.forcesched import ValidationError
@@ -61,7 +60,6 @@ work_dir = os.path.abspath(ini['general'].get("workdir", "."))
scripts_dir = os.path.abspath("../scripts")
repo_url = ini['repo'].get("url")
-repo_branch = ini['repo'].get("branch", "master")
rsync_defopts = ["-v", "-4", "--timeout=120"]
@@ -279,8 +277,8 @@ populateTargets()
c['change_source'] = []
c['change_source'].append(GitPoller(
repo_url,
- workdir=work_dir+'/work.git', branch=repo_branch,
- pollinterval=300))
+ workdir=work_dir+'/work.git', branches=branchNames,
+ pollAtLaunch=True, pollinterval=300))
####### SCHEDULERS
@@ -299,7 +297,7 @@ class TagChoiceParameter(BaseParameter):
@property
def choices(self):
taglist = []
- basever = re.search(r'-([0-9]+\.[0-9]+)$', repo_branch)
+ basever = re.search(r'-([0-9]+\.[0-9]+)$', "master") # XXX FIXME
if basever:
findtags = subprocess.Popen(
@@ -330,10 +328,10 @@ class TagChoiceParameter(BaseParameter):
return s
c['schedulers'] = []
-c['schedulers'].append(SingleBranchScheduler(
+c['schedulers'].append(AnyBranchScheduler(
name = "all",
- change_filter = filter.ChangeFilter(branch=repo_branch),
- treeStableTimer = 60,
+ change_filter = util.ChangeFilter(branch=branchNames),
+ treeStableTimer = 15*60,
builderNames = list(targets)))
c['schedulers'].append(ForceScheduler(
More information about the lede-commits
mailing list