我在这里讨论的问题基本相同buildbot scheduler not work,但答案可能不适用 - 可能是因为我有更新版本的buildbot
>buildbot --version
Buildbot version: 0.8.12
Twisted version: 16.2.0
在Windows 7 64位上运行。
我喜欢svn提交来触发buildbot构建器,但是只有Periodic调度程序(启用时)会触发构建器。日志显示
2016-06-10 11:40:18-0700 [-] SVNPoller: polling
2016-06-10 11:40:18-0700 [-] SVNPoller: svnurl=file:///G:/buildbot/buildbot_repo/trunk/triggers_for_testing, root=file:///G:/buildbot/buildbot_repo, so prefix=trunk/triggers_for_testing
2016-06-10 11:40:18-0700 [-] SVNPoller: starting at change 31
2016-06-10 11:40:18-0700 [-] SVNPoller: _process_changes None .. 31
2016-06-10 11:40:18-0700 [-] SVNPoller: finished polling None
2016-06-10 11:40:38-0700 [-] SVNPoller: polling
2016-06-10 11:40:38-0700 [-] SVNPoller: _process_changes 31 .. 32
2016-06-10 11:40:38-0700 [-] Adding change revision 32
2016-06-10 11:40:38-0700 [-] SVNPoller: finished polling None
但调度程序不会触发构建器。
上面引用的问题的答案说日志应该包括条目"添加更改更改(..."如果SVNPoller正在工作,然后建议在这些条目中查找什么。我的日志不包括任何此类条目。
下面是master.cfg和(tail of)twistd.log文件的片段。 任何最感谢的帮助。
了解master.cfg:
# -*- python -*-
# ex: set syntax=python:
_test_buildbot = False # Set to True to use configuration settings that facilicate testing
_poll_test_repository = True # Set to True to enable testing of an SVNPoller and SingleBranchScheduler monitoring the local repository "file:///G:/buildbot/buildbot_repo/trunk/triggers_for_testing".
_hypersensitive_SVNPoller = True # Set to True to facilicate testing of the SVNPoller and SingleBranchScheduler, making them poll frequently and look for changes *anywhere*.
# This is a sample buildmaster config file. It must be installed as
# 'master.cfg' in your buildmaster's base directory.
# This is the dictionary that the buildmaster pays attention to. We also use
# a shorter alias to save typing.
c = BuildmasterConfig = {}
####### STEPS
<SNIPPED...>
####### BUILDSLAVES
from buildbot import buildslave
from buildbot.schedulers.basic import SingleBranchScheduler
from buildbot.changes import filter
# The 'slaves' list defines the set of recognized buildslaves. Each element is
# a BuildSlave object, specifying a unique slave name and password. The same
# slave name and password must be configured on the slave.
c['slaves'] = [ buildslave.BuildSlave("win64-worker", "pass"),
buildslave.BuildSlave("centos7-worker", "pass"),
]
# 'protocols' contains information about protocols which master will use for
# communicating with slaves.
# You must define at least 'port' option that slaves could connect to your master
# with this protocol.
# 'port' must match the value configured into the buildslaves (with their
# --master option)
c['protocols'] = {'pb': {'port': 9989}}
####### SCHEDULERS
from buildbot.schedulers.timed import Periodic
# Configure the Schedulers, which decide how to react to incoming changes. In this
# case, just kick off a 'ifort_win32_build', 'ifort_win64_build', gfortran_win64_build, and gfortran_centos7_build builds
# define the dynamic scheduler
trunk_sf_codechanged = SingleBranchScheduler(name = "trunk_sf_codechanged",
change_filter = filter.ChangeFilter(
repository = "svn://kraken",
branch = None if _hypersensitive_SVNPoller else "trunk/sf_code",
),
treeStableTimer = 1 * 30 if _test_buildbot else 10 * 60,
builderNames = ["ifort_win32_build",
"ifort_win64_build",
"gfortran_win64_build",
"gfortran_centos7_build",
],
)
triggers_for_testing_changed = SingleBranchScheduler(name = "test_triggers_changed",
change_filter = filter.ChangeFilter(
repository = "file:///G:/buildbot/buildbot_repo/trunk/triggers_for_testing",
branch = None,
),
treeStableTimer = 1 * 20,
builderNames = ["ifort_win32_build",
"ifort_win64_build",
"gfortran_win64_build",
"gfortran_centos7_build",
],
)
# define the periodic scheduler
periodicscheduler = Periodic(name = "Every 4 Days",
builderNames = ["ifort_win32_build",
"ifort_win64_build",
"gfortran_win64_build",
"gfortran_centos7_build",
],
periodicBuildTimer = 10*60 if _test_buildbot else 4*24*60*60,
)
# define the available schedulers
c['schedulers'] = [
trunk_sf_codechanged,
]
if _poll_test_repository:
c['schedulers'].append(triggers_for_testing_changed)
if _test_buildbot:
c['schedulers'].append(periodicscheduler)
####### CHANGESOURCES
from buildbot.changes.svnpoller import SVNPoller, split_file_branches
from twisted.python import log
# the 'change_source' setting tells the buildmaster how it should find out
# about source code changes.
svn_nwra_mry_poller = SVNPoller(svnurl = "svn://kraken" if _hypersensitive_SVNPoller else "svn://kraken/trunk/sf_code",
svnuser = "buildbot",
svnpasswd = "buildbot",
svnbin = 'C:/Program Files/TortoiseSVN/bin/svn.exe',
pollinterval = 1 * 20 if _test_buildbot else 10 * 60,
split_file = split_file_branches)
test_trigger_poller = SVNPoller(svnurl = "file:///G:/buildbot/buildbot_repo/trunk/triggers_for_testing",
svnuser = "buildbot",
svnpasswd = "buildbot",
svnbin = 'C:/Program Files/TortoiseSVN/bin/svn.exe',
pollinterval = 1 * 20,
split_file = split_file_branches)
c['change_source'] = [
svn_nwra_mry_poller,
]
if _poll_test_repository:
c['change_source'].append(test_trigger_poller)
<SNIPPED...>
twistd.log的尾巴:
2016-06-10 10:39:26-0700 [-] BuildMaster is running
2016-06-10 10:39:26-0700 [-] Main loop terminated.
2016-06-10 10:39:26-0700 [-] Server Shut Down.
2016-06-10 10:39:26-0700 [-] Server Shut Down.
2016-06-10 11:33:48-0700 [-] Loading buildbot.tac...
2016-06-10 11:33:48-0700 [-] Loaded.
2016-06-10 11:33:48-0700 [-] twistd 16.2.0 (C:\Users\buildbot\AppData\Local\Programs\WinPython-64bit-2.7.10.3\python-2.7.10.amd64\python.exe 2.7.10) starting up.
2016-06-10 11:33:48-0700 [-] reactor class: twisted.internet.selectreactor.SelectReactor.
2016-06-10 11:33:48-0700 [-] Starting BuildMaster -- buildbot.version: 0.8.12
2016-06-10 11:33:48-0700 [-] Loading configuration from 'G:\\buildbot\\master\\master.cfg'
2016-06-10 11:33:49-0700 [-] Setting up database with URL 'sqlite:///state.sqlite'
2016-06-10 11:33:49-0700 [-] setting database journal mode to 'wal'
2016-06-10 11:33:49-0700 [-] Using SQLite Version (3, 6, 21)
2016-06-10 11:33:49-0700 [-] NOTE: this old version of SQLite does not support WAL journal mode; a busy master may encounter 'Database is locked' errors. Consider upgrading.
2016-06-10 11:33:49-0700 [-] adding 2 new changesources, removing 0
2016-06-10 11:33:49-0700 [-] adding 2 new slaves, removing 0
2016-06-10 11:33:49-0700 [-] adding 4 new builders, removing 0
2016-06-10 11:33:49-0700 [-] trying to load status pickle from G:\buildbot\master\ifort_win32_build\builder
2016-06-10 11:33:49-0700 [-] added builder ifort_win32_build with tags None
2016-06-10 11:33:49-0700 [-] trying to load status pickle from G:\buildbot\master\gfortran_win64_build\builder
2016-06-10 11:33:49-0700 [-] added builder gfortran_win64_build with tags None
2016-06-10 11:33:49-0700 [-] trying to load status pickle from G:\buildbot\master\gfortran_centos7_build\builder
2016-06-10 11:33:49-0700 [-] added builder gfortran_centos7_build with tags None
2016-06-10 11:33:49-0700 [-] trying to load status pickle from G:\buildbot\master\ifort_win64_build\builder
2016-06-10 11:33:49-0700 [-] added builder ifort_win64_build with tags None
2016-06-10 11:33:49-0700 [-] PBServerFactory starting on 9989
2016-06-10 11:33:49-0700 [-] Starting factory <twisted.spread.pb.PBServerFactory instance at 0x00000000056AF508>
2016-06-10 11:33:49-0700 [-] adding scheduler 'test_triggers_changed'
2016-06-10 11:33:49-0700 [-] adding scheduler 'trunk_sf_codechanged'
2016-06-10 11:33:49-0700 [-] WebStatus using (G:\buildbot\master\public_html)
2016-06-10 11:33:49-0700 [-] RotateLogSite starting on 8010
2016-06-10 11:33:49-0700 [-] Starting factory <buildbot.status.web.baseweb.RotateLogSite instance at 0x0000000005711208>
2016-06-10 11:33:49-0700 [-] Setting up http.log rotating 10 files of 10000000 bytes each
2016-06-10 11:33:49-0700 [-] BuildMaster is running
2016-06-10 11:34:09-0700 [-] SVNPoller: polling
2016-06-10 11:34:09-0700 [-] SVNPoller: svnurl=file:///G:/buildbot/buildbot_repo/trunk/triggers_for_testing, root=file:///G:/buildbot/buildbot_repo, so prefix=trunk/triggers_for_testing
2016-06-10 11:34:09-0700 [-] SVNPoller: starting at change 30
2016-06-10 11:34:09-0700 [-] SVNPoller: _process_changes None .. 30
2016-06-10 11:34:09-0700 [-] SVNPoller: finished polling None
2016-06-10 11:34:29-0700 [Broker,0,192.168.77.222] slave 'centos7-worker' attaching from IPv4Address(TCP, '192.168.77.222', 53458)
2016-06-10 11:34:29-0700 [Broker,0,192.168.77.222] Got slaveinfo from 'centos7-worker'
2016-06-10 11:34:29-0700 [Broker,0,192.168.77.222] Starting buildslave keepalive timer for 'centos7-worker'
2016-06-10 11:34:29-0700 [Broker,0,192.168.77.222] bot attached
2016-06-10 11:34:29-0700 [Broker,0,192.168.77.222] Buildslave centos7-worker attached to gfortran_centos7_build
2016-06-10 11:34:29-0700 [-] SVNPoller: polling
2016-06-10 11:34:29-0700 [-] SVNPoller: no changes
2016-06-10 11:34:29-0700 [-] SVNPoller: _process_changes 30 .. 30
2016-06-10 11:34:29-0700 [-] SVNPoller: finished polling None
2016-06-10 11:34:49-0700 [-] SVNPoller: polling
2016-06-10 11:34:49-0700 [-] SVNPoller: no changes
2016-06-10 11:34:49-0700 [-] SVNPoller: _process_changes 30 .. 30
2016-06-10 11:34:49-0700 [-] SVNPoller: finished polling None
2016-06-10 11:35:09-0700 [-] SVNPoller: polling
2016-06-10 11:35:09-0700 [-] SVNPoller: _process_changes 30 .. 31
2016-06-10 11:35:09-0700 [-] Adding change revision 31
2016-06-10 11:35:09-0700 [-] SVNPoller: finished polling None
2016-06-10 11:35:26-0700 [Broker,1,169.254.203.227] slave 'win64-worker' attaching from IPv4Address(TCP, '169.254.203.227', 53461)
2016-06-10 11:35:26-0700 [Broker,1,169.254.203.227] Got slaveinfo from 'win64-worker'
2016-06-10 11:35:26-0700 [Broker,1,169.254.203.227] Starting buildslave keepalive timer for 'win64-worker'
2016-06-10 11:35:26-0700 [Broker,1,169.254.203.227] bot attached
2016-06-10 11:35:26-0700 [Broker,1,169.254.203.227] Buildslave win64-worker attached to ifort_win32_build
2016-06-10 11:35:26-0700 [Broker,1,169.254.203.227] Buildslave win64-worker attached to gfortran_win64_build
2016-06-10 11:35:26-0700 [Broker,1,169.254.203.227] Buildslave win64-worker attached to ifort_win64_build
2016-06-10 11:35:29-0700 [-] SVNPoller: polling
2016-06-10 11:35:29-0700 [-] SVNPoller: no changes
2016-06-10 11:35:29-0700 [-] SVNPoller: _process_changes 31 .. 31
2016-06-10 11:35:29-0700 [-] SVNPoller: finished polling None
2016-06-10 11:35:49-0700 [-] SVNPoller: polling
2016-06-10 11:35:49-0700 [-] SVNPoller: no changes
2016-06-10 11:35:49-0700 [-] SVNPoller: _process_changes 31 .. 31
2016-06-10 11:35:49-0700 [-] SVNPoller: finished polling None
2016-06-10 11:36:09-0700 [-] SVNPoller: polling
2016-06-10 11:36:09-0700 [-] SVNPoller: no changes
2016-06-10 11:36:09-0700 [-] SVNPoller: _process_changes 31 .. 31
2016-06-10 11:36:09-0700 [-] SVNPoller: finished polling None
2016-06-10 11:36:29-0700 [-] SVNPoller: polling
2016-06-10 11:36:29-0700 [-] SVNPoller: no changes
2016-06-10 11:36:29-0700 [-] SVNPoller: _process_changes 31 .. 31
2016-06-10 11:36:29-0700 [-] SVNPoller: finished polling None
2016-06-10 11:36:49-0700 [-] SVNPoller: polling
2016-06-10 11:36:49-0700 [-] SVNPoller: no changes
2016-06-10 11:36:49-0700 [-] SVNPoller: _process_changes 31 .. 31
2016-06-10 11:36:49-0700 [-] SVNPoller: finished polling None
2016-06-10 11:37:09-0700 [-] SVNPoller: polling
2016-06-10 11:37:09-0700 [-] SVNPoller: no changes
2016-06-10 11:37:09-0700 [-] SVNPoller: _process_changes 31 .. 31
2016-06-10 11:37:09-0700 [-] SVNPoller: finished polling None
2016-06-10 11:37:29-0700 [-] SVNPoller: polling
2016-06-10 11:37:29-0700 [-] SVNPoller: no changes
2016-06-10 11:37:29-0700 [-] SVNPoller: _process_changes 31 .. 31
2016-06-10 11:37:29-0700 [-] SVNPoller: finished polling None
2016-06-10 11:37:49-0700 [-] SVNPoller: polling
2016-06-10 11:37:49-0700 [-] SVNPoller: no changes
2016-06-10 11:37:49-0700 [-] SVNPoller: _process_changes 31 .. 31
2016-06-10 11:37:49-0700 [-] SVNPoller: finished polling None
2016-06-10 11:38:09-0700 [-] SVNPoller: polling
2016-06-10 11:38:09-0700 [-] SVNPoller: no changes
2016-06-10 11:38:09-0700 [-] SVNPoller: _process_changes 31 .. 31
2016-06-10 11:38:09-0700 [-] SVNPoller: finished polling None
2016-06-10 11:38:29-0700 [-] SVNPoller: polling
2016-06-10 11:38:29-0700 [-] SVNPoller: no changes
2016-06-10 11:38:29-0700 [-] SVNPoller: _process_changes 31 .. 31
2016-06-10 11:38:29-0700 [-] SVNPoller: finished polling None
2016-06-10 11:38:32-0700 [-] Received SIGINT, shutting down.
2016-06-10 11:38:32-0700 [-] (TCP Port 8010 Closed)
2016-06-10 11:38:32-0700 [-] Stopping factory <buildbot.status.web.baseweb.RotateLogSite instance at 0x0000000005711208>
2016-06-10 11:38:32-0700 [Broker,0,192.168.77.222] BuildSlave.detached(centos7-worker)
2016-06-10 11:38:32-0700 [Broker,0,192.168.77.222] releaseLocks(<BuildSlave 'centos7-worker'>): []
2016-06-10 11:38:32-0700 [Broker,0,192.168.77.222] Buildslave centos7-worker detached from gfortran_centos7_build
2016-06-10 11:38:32-0700 [Broker,1,169.254.203.227] BuildSlave.detached(win64-worker)
2016-06-10 11:38:32-0700 [Broker,1,169.254.203.227] releaseLocks(<BuildSlave 'win64-worker'>): []
2016-06-10 11:38:32-0700 [Broker,1,169.254.203.227] Buildslave win64-worker detached from ifort_win32_build
2016-06-10 11:38:32-0700 [Broker,1,169.254.203.227] Buildslave win64-worker detached from gfortran_win64_build
2016-06-10 11:38:32-0700 [Broker,1,169.254.203.227] Buildslave win64-worker detached from ifort_win64_build
2016-06-10 11:38:32-0700 [-] (TCP Port 9989 Closed)
2016-06-10 11:38:32-0700 [-] Stopping factory <twisted.spread.pb.PBServerFactory instance at 0x00000000056AF508>
2016-06-10 11:38:32-0700 [-] Main loop terminated.
2016-06-10 11:38:32-0700 [-] Server Shut Down.
2016-06-10 11:38:32-0700 [-] Server Shut Down.
2016-06-10 11:39:56-0700 [-] Loading buildbot.tac...
2016-06-10 11:39:57-0700 [-] Loaded.
2016-06-10 11:39:57-0700 [-] twistd 16.2.0 (C:\Users\buildbot\AppData\Local\Programs\WinPython-64bit-2.7.10.3\python-2.7.10.amd64\python.exe 2.7.10) starting up.
2016-06-10 11:39:57-0700 [-] reactor class: twisted.internet.selectreactor.SelectReactor.
2016-06-10 11:39:57-0700 [-] Starting BuildMaster -- buildbot.version: 0.8.12
2016-06-10 11:39:57-0700 [-] Loading configuration from 'G:\\buildbot\\master\\master.cfg'
2016-06-10 11:39:57-0700 [-] Setting up database with URL 'sqlite:///state.sqlite'
2016-06-10 11:39:57-0700 [-] setting database journal mode to 'wal'
2016-06-10 11:39:57-0700 [-] Using SQLite Version (3, 6, 21)
2016-06-10 11:39:57-0700 [-] NOTE: this old version of SQLite does not support WAL journal mode; a busy master may encounter 'Database is locked' errors. Consider upgrading.
2016-06-10 11:39:58-0700 [-] adding 2 new changesources, removing 0
2016-06-10 11:39:58-0700 [-] adding 2 new slaves, removing 0
2016-06-10 11:39:58-0700 [-] adding 4 new builders, removing 0
2016-06-10 11:39:58-0700 [-] trying to load status pickle from G:\buildbot\master\ifort_win32_build\builder
2016-06-10 11:39:58-0700 [-] added builder ifort_win32_build with tags None
2016-06-10 11:39:58-0700 [-] trying to load status pickle from G:\buildbot\master\gfortran_win64_build\builder
2016-06-10 11:39:58-0700 [-] added builder gfortran_win64_build with tags None
2016-06-10 11:39:58-0700 [-] trying to load status pickle from G:\buildbot\master\gfortran_centos7_build\builder
2016-06-10 11:39:58-0700 [-] added builder gfortran_centos7_build with tags None
2016-06-10 11:39:58-0700 [-] trying to load status pickle from G:\buildbot\master\ifort_win64_build\builder
2016-06-10 11:39:58-0700 [-] added builder ifort_win64_build with tags None
2016-06-10 11:39:58-0700 [-] PBServerFactory starting on 9989
2016-06-10 11:39:58-0700 [-] Starting factory <twisted.spread.pb.PBServerFactory instance at 0x000000000575E8C8>
2016-06-10 11:39:58-0700 [-] adding scheduler 'test_triggers_changed'
2016-06-10 11:39:58-0700 [-] adding scheduler 'trunk_sf_codechanged'
2016-06-10 11:39:58-0700 [-] WebStatus using (G:\buildbot\master\public_html)
2016-06-10 11:39:58-0700 [-] RotateLogSite starting on 8010
2016-06-10 11:39:58-0700 [-] Starting factory <buildbot.status.web.baseweb.RotateLogSite instance at 0x00000000057BB0C8>
2016-06-10 11:39:58-0700 [-] Setting up http.log rotating 10 files of 10000000 bytes each
2016-06-10 11:39:58-0700 [-] BuildMaster is running
2016-06-10 11:40:03-0700 [Broker,0,169.254.203.227] slave 'win64-worker' attaching from IPv4Address(TCP, '169.254.203.227', 53479)
2016-06-10 11:40:03-0700 [Broker,0,169.254.203.227] Got slaveinfo from 'win64-worker'
2016-06-10 11:40:03-0700 [Broker,0,169.254.203.227] Starting buildslave keepalive timer for 'win64-worker'
2016-06-10 11:40:03-0700 [Broker,0,169.254.203.227] bot attached
2016-06-10 11:40:03-0700 [Broker,0,169.254.203.227] Buildslave win64-worker attached to ifort_win32_build
2016-06-10 11:40:03-0700 [Broker,0,169.254.203.227] Buildslave win64-worker attached to gfortran_win64_build
2016-06-10 11:40:03-0700 [Broker,0,169.254.203.227] Buildslave win64-worker attached to ifort_win64_build
2016-06-10 11:40:05-0700 [Broker,1,192.168.77.222] slave 'centos7-worker' attaching from IPv4Address(TCP, '192.168.77.222', 53480)
2016-06-10 11:40:05-0700 [Broker,1,192.168.77.222] Got slaveinfo from 'centos7-worker'
2016-06-10 11:40:05-0700 [Broker,1,192.168.77.222] Starting buildslave keepalive timer for 'centos7-worker'
2016-06-10 11:40:05-0700 [Broker,1,192.168.77.222] bot attached
2016-06-10 11:40:05-0700 [Broker,1,192.168.77.222] Buildslave centos7-worker attached to gfortran_centos7_build
2016-06-10 11:40:18-0700 [-] SVNPoller: polling
2016-06-10 11:40:18-0700 [-] SVNPoller: svnurl=file:///G:/buildbot/buildbot_repo/trunk/triggers_for_testing, root=file:///G:/buildbot/buildbot_repo, so prefix=trunk/triggers_for_testing
2016-06-10 11:40:18-0700 [-] SVNPoller: starting at change 31
2016-06-10 11:40:18-0700 [-] SVNPoller: _process_changes None .. 31
2016-06-10 11:40:18-0700 [-] SVNPoller: finished polling None
2016-06-10 11:40:38-0700 [-] SVNPoller: polling
2016-06-10 11:40:38-0700 [-] SVNPoller: _process_changes 31 .. 32
2016-06-10 11:40:38-0700 [-] Adding change revision 32
2016-06-10 11:40:38-0700 [-] SVNPoller: finished polling None
2016-06-10 11:40:58-0700 [-] SVNPoller: polling
2016-06-10 11:40:58-0700 [-] SVNPoller: no changes
2016-06-10 11:40:58-0700 [-] SVNPoller: _process_changes 32 .. 32
2016-06-10 11:40:58-0700 [-] SVNPoller: finished polling None
2016-06-10 11:41:18-0700 [-] SVNPoller: polling
2016-06-10 11:41:18-0700 [-] SVNPoller: no changes
2016-06-10 11:41:18-0700 [-] SVNPoller: _process_changes 32 .. 32
2016-06-10 11:41:18-0700 [-] SVNPoller: finished polling None
2016-06-10 11:41:38-0700 [-] SVNPoller: polling
答案 0 :(得分:1)
我设法通过完全删除
解决了这个问题split_file = split_file_branches
两个SVNPoller构造函数的参数。似乎split_file不是轮询组织为我的存储库中的单个分支所必需的。