[users at bb.net] Unable to run builder
Chris Spencer
chrisspen at gmail.com
Mon Jan 4 18:50:58 UTC 2016
How do you configure a builder to run a specific script in your source?
I have a "runtests" script in my code which creates the Python virtualenv,
creates an in-memory test database, and runs all unittests, but when I
enter a builder command like "cd src/myproject; runtests", I get the error:
Upon execvpe cd src/myproject; ./runtests ['cd src/myproject;
./runtests'] in environment id 140610380051352
:Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/twisted/internet/process.py",
line 403, in _fork
path, uid, gid, executable, args, environment)
File "/usr/lib/python2.7/dist-packages/twisted/internet/process.py",
line 453, in _execChild
os.execvpe(executable, args, environment)
File "/usr/lib/python2.7/os.py", line 353, in execvpe
_execvpe(file, args, env)
File "/usr/lib/python2.7/os.py", line 368, in _execvpe
func(file, *argrest)
OSError: [Errno 2] No such file or directory
presumably because Buildbot's default CWD is not the same as my code's
clone directory.
The tutorial (http://docs.buildbot.net/current/tutorial/tour.html) is a
little confusing. It calls "trial pyflakes", which is a globally-accessible
command, so it's not clear how Buildbot knows where anything is. How do I
construct my command to reference Buildbot's CWD and the location where it
checks-out my code?
My master.cfg looks like:
c['change_source'] = []
c['change_source'].append(changes.GitPoller(
'https://myuser:mypass@bitbucket.org/myproject/myproject.git',
workdir='gitpoller-workdir',
branch='master',
pollinterval=300, # interval in seconds between polls
))
####### SCHEDULERS
c['schedulers'] = []
c['schedulers'].append(schedulers.SingleBranchScheduler(
name="all",
change_filter=util.ChangeFilter(branch='master'),
#The scheduler will wait for this many seconds before starting the
build.
treeStableTimer=None,
builderNames=["myproject_runtests"],
))
c['schedulers'].append(schedulers.ForceScheduler(
name="force",
builderNames=["myproject_runtests"]))
####### BUILDERS
factory = util.BuildFactory()
factory.addStep(steps.Git(repourl='
https://myuser:mypass@bitbucket.org/myproject/myproject.git',
mode='incremental'))
factory.addStep(steps.ShellCommand(command=["cd src/myproject;
./runtests"]))
c['builders'] = []
c['builders'].append(
util.BuilderConfig(name="myproject_runtests",
slavenames=["example-slave"],
factory=factory))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/users/attachments/20160104/1eee4e96/attachment.html>
More information about the users
mailing list