[Buildbot-devel] two questions about buildbot ( 1: cancel on web UI, 2:specify revision for one of two svn repos)

154193912 at qq.com 154193912 at qq.com
Sat Jan 31 03:28:45 UTC 2015





moryaden at qq.com
 
From: 154193912 at qq.com
Date: 2015-01-31 09:46
To: buildbot-devel
Subject: Re: [Buildbot-devel] two questions about buildbot ( 1: cancel on web UI, 2:specify revision for one of two svn repos)

Date: Fri, 30 Jan 2015 12:47:12 +0800
From: "154193912 at qq.com" <154193912 at qq.com>
Subject: [Buildbot-devel] two questions about buildbot ( 1: cancel on
web UI, 2:specify revision for one of two svn repos)
To: buildbot-devel <buildbot-devel at lists.sourceforge.net>
Message-ID: <2015013012471174089611 at qq.com>
Content-Type: text/plain; charset="gb2312"
 
Hi everyone!
 
I just start using buildbot recently, have read the docs roughly, still can't find my solution.
 
1. Within the web ui page, I can't find a link or something to cancel a running builder.
Am I looking for the wrong direction?
 
2, I got a forcebuilder with two svn repos, one would be normal project files, and the other
contains some util scripts, there isn't anything I can do to merge the two repos togather,
which should of cause solve my later problem. 
I wan't to specify a target revision number on project svn( for example v135), 
but the v135 got propgrated to the util repos, which has only 
a maximume revision value of 10, then, the util repos fails to checkout ...
 
I am using buildbot 0.8.9 official package, nothing customized..
-------------- next part --------------
An HTML attachment was scrubbed...
 
------------------------------
 
Message: 5
Date: Fri, 30 Jan 2015 13:38:54 +0800
From: Edmund Wong <ewongbb at pw-wspx.org>
Subject: Re: [Buildbot-devel] two questions about buildbot ( 1: cancel
on web UI, 2:specify revision for one of two svn repos)
To: buildbot-devel at lists.sourceforge.net
Message-ID: <54CB18EE.5090505 at pw-wspx.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 
154193912 at qq.com wrote:
> Hi everyone!
>
> I just start using buildbot recently, have read the docs roughly, still can't find my solution.
>
> 1. Within the web ui page, I can't find a link or something to cancel a running builder.
> Am I looking for the wrong direction?
>
 
You need to be logged on to do that; assuming that you've set up the
proper authorization in your master.cfg file.

Yes, I have logged on, and have it configured with user/pswd. 
 
> 2, I got a forcebuilder with two svn repos, one would be normal project files, and the other
> contains some util scripts, there isn't anything I can do to merge the two repos togather,
> which should of cause solve my later problem.
> I wan't to specify a target revision number on project svn( for example v135),
> but the v135 got propgrated to the util repos, which has only
> a maximume revision value of 10, then, the util repos fails to checkout ...
 
then you have to split up the buildsteps such that it saves the
revisions to different properties and then use those properties
to tell the forcebuilder which revisions to use for the repos.

I have a builder with these configuration. And revision text field from web force UI,
there is only one of this filed.

check_prj_svn = svn.SVN( 
    repourl = project_svn_url,
    username = project_svn_user,
    password = project_svn_pswd,
    )
    
check_auto_script_svn  = svn.SVN( 
    repourl = auto_script_svn_url,
    )

factory.addStep(check_prj_svn)
factory.addStep(check_auto_script_svn)
 
Edmund
 
for the first question, I still have no clue.
But with the second one, I think I got an idea, but without a full solution.
For short words, use two codebases inside a single forcescheduler.
Should be something like this...

I think I am walking on the right path...

======= python codeblock from cfg file ================

auto_script_svn_url = r'svn://192.168.28.99/deploy-scripts/trunk'
project_svn_url =      r'http://192.168.7.237/masked-project/trunk'

all_repositories = {
    auto_script_svn_url : 'util-script-repos',
    aa_svn_url :        'abc-repos',
}

def codebaseGenerator(chdict):
    return all_repositories[chdict['repository']]
 
c = BuildmasterConfig = {}

c['codebaseGenerator'] = codebaseGenerator
# ....
c['schedulers'] = []

forced_code_bases = [
    #CodebaseParameter(codebase='util-script-repos'), # if uncomment this line, web UI page could get another form to specilize revision for this repository.
    CodebaseParameter(codebase='abc-repos'),
]

forcebuildScheduler = ForceScheduler(
    name="force",
    reason=StringParameter(name='reason', label="reason:<br>",
        required = True, 
        default  = "force build",
        size     = 80,
    ),
    builderNames=["abc-builder"],
    buttonName = "Manual Start Build",
    codebases = forced_code_bases,
)
c['schedulers'].append(forcebuildScheduler)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20150131/14ed8cc1/attachment.html>


More information about the devel mailing list