[Checkins] SVN: gocept.bsquare/branches/pcardune-setup/ moving
stuff around to make this look more like an egg. still more
needs to be done.
Paul Carduner
paulcarduner at gmail.com
Mon Mar 24 18:21:54 EDT 2008
Log message for revision 84911:
moving stuff around to make this look more like an egg. still more needs to be done.
Changed:
_U gocept.bsquare/branches/pcardune-setup/
D gocept.bsquare/branches/pcardune-setup/__init__.py
A gocept.bsquare/branches/pcardune-setup/bootstrap.py
A gocept.bsquare/branches/pcardune-setup/buildout.cfg
D gocept.bsquare/branches/pcardune-setup/master.py
A gocept.bsquare/branches/pcardune-setup/setup.py
A gocept.bsquare/branches/pcardune-setup/src/
A gocept.bsquare/branches/pcardune-setup/src/gocept/
A gocept.bsquare/branches/pcardune-setup/src/gocept/__init__.py
A gocept.bsquare/branches/pcardune-setup/src/gocept/bsquare/
A gocept.bsquare/branches/pcardune-setup/src/gocept/bsquare/__init__.py
A gocept.bsquare/branches/pcardune-setup/src/gocept/bsquare/master.py
A gocept.bsquare/branches/pcardune-setup/src/gocept/bsquare/static/
A gocept.bsquare/branches/pcardune-setup/src/gocept/bsquare/status.py
D gocept.bsquare/branches/pcardune-setup/static/
D gocept.bsquare/branches/pcardune-setup/status.py
U gocept.bsquare/branches/pcardune-setup/update-config.sh
-=-
Property changes on: gocept.bsquare/branches/pcardune-setup
___________________________________________________________________
Name: svn:ignore
+ bin
.installed.cfg
develop-eggs
parts
Deleted: gocept.bsquare/branches/pcardune-setup/__init__.py
===================================================================
Added: gocept.bsquare/branches/pcardune-setup/bootstrap.py
===================================================================
--- gocept.bsquare/branches/pcardune-setup/bootstrap.py (rev 0)
+++ gocept.bsquare/branches/pcardune-setup/bootstrap.py 2008-03-24 22:21:52 UTC (rev 84911)
@@ -0,0 +1,52 @@
+##############################################################################
+#
+# Copyright (c) 2007 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Bootstrap a buildout-based project
+
+Simply run this script in a directory containing a buildout.cfg.
+The script accepts buildout command-line options, so you can
+use the -c option to specify an alternate configuration file.
+
+$Id: bootstrap.py 77221 2007-06-29 06:56:54Z srichter $
+"""
+
+import os, shutil, sys, tempfile, urllib2
+
+tmpeggs = tempfile.mkdtemp()
+
+ez = {}
+exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
+ ).read() in ez
+ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
+
+import pkg_resources
+
+cmd = 'from setuptools.command.easy_install import main; main()'
+if sys.platform == 'win32':
+ cmd = '"%s"' % cmd # work around spawn lamosity on windows
+
+ws = pkg_resources.working_set
+assert os.spawnle(
+ os.P_WAIT, sys.executable, sys.executable,
+ '-c', cmd, '-mqNxd', tmpeggs, 'zc.buildout',
+ dict(os.environ,
+ PYTHONPATH=
+ ws.find(pkg_resources.Requirement.parse('setuptools')).location
+ ),
+ ) == 0
+
+ws.add_entry(tmpeggs)
+ws.require('zc.buildout')
+import zc.buildout.buildout
+zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
+shutil.rmtree(tmpeggs)
Added: gocept.bsquare/branches/pcardune-setup/buildout.cfg
===================================================================
--- gocept.bsquare/branches/pcardune-setup/buildout.cfg (rev 0)
+++ gocept.bsquare/branches/pcardune-setup/buildout.cfg 2008-03-24 22:21:52 UTC (rev 84911)
@@ -0,0 +1,8 @@
+[buildout]
+develop = .
+parts = buildbot
+
+[buildbot]
+recipe = zc.recipe.egg
+eggs = gocept.bsquare
+interpreter = python
\ No newline at end of file
Deleted: gocept.bsquare/branches/pcardune-setup/master.py
===================================================================
--- gocept.bsquare/branches/pcardune-setup/master.py 2008-03-24 22:21:22 UTC (rev 84910)
+++ gocept.bsquare/branches/pcardune-setup/master.py 2008-03-24 22:21:52 UTC (rev 84911)
@@ -1,89 +0,0 @@
-# A buildbot master configuration for buildout-based project repositories
-
-import os.path
-import subprocess
-from twisted.python import log
-
-from buildbot import locks
-
-from buildbot.changes.svnpoller import SVNPoller, split_file_branches
-from buildbot.steps.source import SVN
-from buildbot.steps.shell import Compile
-from buildbot.process.factory import BuildFactory
-
-from buildbot.process.base import Build
-from buildbot.status import html
-from buildbot.scheduler import Scheduler, Nightly
-
-import bsquare.status
-
-
-def split_file(path):
- pieces = path.split("/")
- if len(pieces) < 2:
- return None
- project, branch = pieces[0], pieces[1]
- if branch != "trunk":
- return None
- return ("%s/%s" % (project, branch), "/".join(pieces[2:]))
-
-
-def make_factory(svn_url):
- f = BuildFactory()
- f.addStep(SVN(baseURL=svn_url, mode='clobber'))
- f.addStep(Compile(name='bootstrap',
- command='buildout bootstrap .',
- description=['bootstrapping'],
- descriptionDone=['bootstrap']))
- f.addStep(Compile(name="buildout",
- command='bin/buildout',
- description=['building'],
- descriptionDone=['build']))
- f.addStep(Compile(name="test",
- command='bin/test --exit-with-status',
- description=['testing'],
- descriptionDone=['tests']))
-
- f.treeStableTimer = 300
- return f
-
-
-def configure(svn_url, http_port=8010, allowForce=False):
- """Creates a buildout master configuration.
-
- The configuration returned is almost functional. You just need to add
- slaves.
-
- """
- c = {}
- c['slavePortnum'] = 8989
- c['change_source'] = SVNPoller(svn_url, split_file=split_file, pollinterval=30)
- c['schedulers'] = []
- c['builders'] = []
-
- slow_lock = locks.SlaveLock("cpu", maxCount=2)
-
- projects = open("project-list.cfg", "rb").readlines()
- projects = [x.strip() for x in projects]
- for project in projects:
- f = make_factory(svn_url)
- c['builders'].append({
- 'name': project,
- 'slavename': 'local',
- 'builddir': project,
- 'factory': f,
- 'locks': [slow_lock],
- })
- del f
-
- c['schedulers'].append(Scheduler(
- project, "%s/trunk" % project, 30, [project]))
- c['schedulers'].append(Nightly(
- "%s nightly" % project, [project], hour=[3],
- branch="%s/trunk" % project))
-
- # Status display(s)
- c['status'] = []
- c['status'].append(bsquare.status.ExtendedWebStatus(http_port=http_port,
- allowForce=allowForce))
- return c
Added: gocept.bsquare/branches/pcardune-setup/setup.py
===================================================================
--- gocept.bsquare/branches/pcardune-setup/setup.py (rev 0)
+++ gocept.bsquare/branches/pcardune-setup/setup.py 2008-03-24 22:21:52 UTC (rev 84911)
@@ -0,0 +1,20 @@
+import os
+from setuptools import setup, find_packages
+
+def read(*rnames):
+ return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+
+setup(
+ name='gocept.bsquare',
+ version = '0.1.0-dev',
+ author='GoCept',
+ packages=find_packages('src'),
+ package_dir = {'': 'src'},
+ license = "ZPL",
+ install_requires=[
+ 'setuptools',
+ 'buildbot',
+ ],
+ include_package_data = True,
+ zip_safe = False,
+ )
Added: gocept.bsquare/branches/pcardune-setup/src/gocept/__init__.py
===================================================================
--- gocept.bsquare/branches/pcardune-setup/src/gocept/__init__.py (rev 0)
+++ gocept.bsquare/branches/pcardune-setup/src/gocept/__init__.py 2008-03-24 22:21:52 UTC (rev 84911)
@@ -0,0 +1,6 @@
+try:
+ # Declare this a namespace package if pkg_resources is available.
+ import pkg_resources
+ pkg_resources.declare_namespace(__name__)
+except ImportError:
+ pass
Copied: gocept.bsquare/branches/pcardune-setup/src/gocept/bsquare/__init__.py (from rev 84905, gocept.bsquare/trunk/__init__.py)
===================================================================
Copied: gocept.bsquare/branches/pcardune-setup/src/gocept/bsquare/master.py (from rev 84905, gocept.bsquare/trunk/master.py)
===================================================================
--- gocept.bsquare/branches/pcardune-setup/src/gocept/bsquare/master.py (rev 0)
+++ gocept.bsquare/branches/pcardune-setup/src/gocept/bsquare/master.py 2008-03-24 22:21:52 UTC (rev 84911)
@@ -0,0 +1,89 @@
+# A buildbot master configuration for buildout-based project repositories
+
+import os.path
+import subprocess
+from twisted.python import log
+
+from buildbot import locks
+
+from buildbot.changes.svnpoller import SVNPoller, split_file_branches
+from buildbot.steps.source import SVN
+from buildbot.steps.shell import Compile
+from buildbot.process.factory import BuildFactory
+
+from buildbot.process.base import Build
+from buildbot.status import html
+from buildbot.scheduler import Scheduler, Nightly
+
+from gocept.bsquare import status
+
+
+def split_file(path):
+ pieces = path.split("/")
+ if len(pieces) < 2:
+ return None
+ project, branch = pieces[0], pieces[1]
+ if branch != "trunk":
+ return None
+ return ("%s/%s" % (project, branch), "/".join(pieces[2:]))
+
+
+def make_factory(svn_url):
+ f = BuildFactory()
+ f.addStep(SVN(baseURL=svn_url, mode='clobber'))
+ f.addStep(Compile(name='bootstrap',
+ command='buildout bootstrap .',
+ description=['bootstrapping'],
+ descriptionDone=['bootstrap']))
+ f.addStep(Compile(name="buildout",
+ command='bin/buildout',
+ description=['building'],
+ descriptionDone=['build']))
+ f.addStep(Compile(name="test",
+ command='bin/test --exit-with-status',
+ description=['testing'],
+ descriptionDone=['tests']))
+
+ f.treeStableTimer = 300
+ return f
+
+
+def configure(svn_url, http_port=8010, allowForce=False):
+ """Creates a buildout master configuration.
+
+ The configuration returned is almost functional. You just need to add
+ slaves.
+
+ """
+ c = {}
+ c['slavePortnum'] = 8989
+ c['change_source'] = SVNPoller(svn_url, split_file=split_file, pollinterval=30)
+ c['schedulers'] = []
+ c['builders'] = []
+
+ slow_lock = locks.SlaveLock("cpu", maxCount=2)
+
+ projects = open("project-list.cfg", "rb").readlines()
+ projects = [x.strip() for x in projects]
+ for project in projects:
+ f = make_factory(svn_url)
+ c['builders'].append({
+ 'name': project,
+ 'slavename': 'local',
+ 'builddir': project,
+ 'factory': f,
+ 'locks': [slow_lock],
+ })
+ del f
+
+ c['schedulers'].append(Scheduler(
+ project, "%s/trunk" % project, 30, [project]))
+ c['schedulers'].append(Nightly(
+ "%s nightly" % project, [project], hour=[3],
+ branch="%s/trunk" % project))
+
+ # Status display(s)
+ c['status'] = []
+ c['status'].append(status.ExtendedWebStatus(http_port=http_port,
+ allowForce=allowForce))
+ return c
Copied: gocept.bsquare/branches/pcardune-setup/src/gocept/bsquare/static (from rev 84905, gocept.bsquare/trunk/static)
Copied: gocept.bsquare/branches/pcardune-setup/src/gocept/bsquare/status.py (from rev 84905, gocept.bsquare/trunk/status.py)
===================================================================
--- gocept.bsquare/branches/pcardune-setup/src/gocept/bsquare/status.py (rev 0)
+++ gocept.bsquare/branches/pcardune-setup/src/gocept/bsquare/status.py 2008-03-24 22:21:52 UTC (rev 84911)
@@ -0,0 +1,130 @@
+# An extended web status display providing a cruise-control-like UI.
+
+import buildbot.status.web.base
+import datetime
+import os.path
+import twisted.web.static
+
+
+STATIC_DIR = os.path.join(os.path.dirname(__file__), 'static')
+
+
+class OverviewStatusResource(buildbot.status.web.base.HtmlResource):
+
+ title = "Buildbot Cruise-control"
+
+ def _builder_status(self, builder):
+ build = builder.getLastFinishedBuild()
+ if build is None:
+ stat = 'never'
+ else:
+ stat = build.getColor()
+ return stat
+
+ def head(self, request):
+ return ('<link href="%s" rel="stylesheet" type="text/css" />' %
+ request.sibLink('cruise.css'))
+
+ def body(self, request):
+ "This method builds the main waterfall display."
+
+ data = ''
+
+ status = self.getStatus(request)
+
+ projectName = status.getProjectName()
+ projectURL = status.getProjectURL()
+
+ data += "<h1>%s</h1>" % projectName
+
+ builders = [status.getBuilder(x) for x in
+ status.getBuilderNames()]
+
+ # Setup filters
+ filters = []
+ filter_status = request.args.get('status', [None])[0] or 'red'
+ # Gah.
+ if filter_status == 'None':
+ filter_status = None
+ # Double-gah!
+ if filter_status != "any":
+ filters.append(lambda x:self._builder_status(x) == filter_status)
+
+ filter_prefix = request.args.get('prefix', [None])[0] or ''
+ filters.append(lambda x:x.getName().startswith(filter_prefix))
+
+ # Create totals
+ status = {}
+ for builder in builders:
+ stat = self._builder_status(builder)
+ if not stat in status:
+ status[stat] = []
+ status[stat].append(builder)
+
+ data += '<form id="filter" action="%s">' % request.sibLink('cruise')
+ data += '<div id="status-blocks">'
+ for stat, affected in status.items():
+ if stat == filter_status:
+ selected = 'checked="checked"'
+ else:
+ selected = ""
+ data += '<div class="%s"><h3><label><input type="radio" name="status" value="%s" %s/> %s</label></h3><p>%s projects</p></div>' % (stat, stat, selected, stat, len(affected))
+
+ if filter_status == "any":
+ selected = 'checked="checked"'
+ else:
+ selected = ''
+ data += '<div><h3><label><input type="radio" name="status" value="any" %s/> Any</label></h3><p> </p></div>' % selected
+
+ data += "</div>"
+ data += '<div class="clear"/>'
+ data += '<div><label for="prefix">Show only projects starting with</label> <input type="text" name="prefix" value="%s"/> <input type="submit" value="Set filter"/></div>' % filter_prefix
+ data += '</form>'
+
+ # Apply filters on builders
+ for f in filters:
+ builders = filter(f, builders)
+ data += "<p>Showing %i projects matching the current filter.</p>" % len(builders)
+
+ # Create detail view panels
+ for builder in builders:
+ activity = builder.getState()[0]
+ data += '<div class="project %s %s"><h2>%s</h2>' % (self._builder_status(builder),
+ activity, builder.getName())
+ data += '<p>This builder is currently %s.</p>' % activity
+ data += "<ul>"
+ for x in range(1,6):
+ build = builder.getBuild(-x)
+ if build is None:
+ break
+ reason = build.reason
+ started = datetime.datetime.fromtimestamp(build.started)
+ started = started.strftime('%d %b, %H:%M')
+ if build.source.changes:
+ change = build.source.changes[0]
+ reason = "%s by %s: %s" % (change.revision, change.who, change.comments)
+ data += '<li style="color:%s;">%s – %s</li>' % (
+ build.color, started, reason)
+ data += "</ul>"
+ data += "</div>"
+
+ return data
+
+
+
+class ExtendedWebStatus(buildbot.status.web.baseweb.WebStatus):
+
+ def __init__(self, *args, **kw):
+ buildbot.status.web.baseweb.WebStatus.__init__(self, *args, **kw)
+
+ def setupUsualPages(self):
+ buildbot.status.web.baseweb.WebStatus.setupUsualPages(self)
+ self.putChild('cruise', OverviewStatusResource())
+
+ css = open(os.path.join(STATIC_DIR, 'cruise.css')).read()
+ self.putChild('cruise.css', twisted.web.static.Data(css, 'text/css'))
+
+ for image in ['headerbg.png', 'headerbg2.png', 'errorbg.png']:
+ data = open(os.path.join(STATIC_DIR, image)).read()
+ self.putChild(image, twisted.web.static.Data(data, 'image/png'))
+
Deleted: gocept.bsquare/branches/pcardune-setup/status.py
===================================================================
--- gocept.bsquare/branches/pcardune-setup/status.py 2008-03-24 22:21:22 UTC (rev 84910)
+++ gocept.bsquare/branches/pcardune-setup/status.py 2008-03-24 22:21:52 UTC (rev 84911)
@@ -1,130 +0,0 @@
-# An extended web status display providing a cruise-control-like UI.
-
-import buildbot.status.web.base
-import datetime
-import os.path
-import twisted.web.static
-
-
-STATIC_DIR = os.path.join(os.path.dirname(__file__), 'static')
-
-
-class OverviewStatusResource(buildbot.status.web.base.HtmlResource):
-
- title = "Buildbot Cruise-control"
-
- def _builder_status(self, builder):
- build = builder.getLastFinishedBuild()
- if build is None:
- stat = 'never'
- else:
- stat = build.getColor()
- return stat
-
- def head(self, request):
- return ('<link href="%s" rel="stylesheet" type="text/css" />' %
- request.sibLink('cruise.css'))
-
- def body(self, request):
- "This method builds the main waterfall display."
-
- data = ''
-
- status = self.getStatus(request)
-
- projectName = status.getProjectName()
- projectURL = status.getProjectURL()
-
- data += "<h1>%s</h1>" % projectName
-
- builders = [status.getBuilder(x) for x in
- status.getBuilderNames()]
-
- # Setup filters
- filters = []
- filter_status = request.args.get('status', [None])[0] or 'red'
- # Gah.
- if filter_status == 'None':
- filter_status = None
- # Double-gah!
- if filter_status != "any":
- filters.append(lambda x:self._builder_status(x) == filter_status)
-
- filter_prefix = request.args.get('prefix', [None])[0] or ''
- filters.append(lambda x:x.getName().startswith(filter_prefix))
-
- # Create totals
- status = {}
- for builder in builders:
- stat = self._builder_status(builder)
- if not stat in status:
- status[stat] = []
- status[stat].append(builder)
-
- data += '<form id="filter" action="%s">' % request.sibLink('cruise')
- data += '<div id="status-blocks">'
- for stat, affected in status.items():
- if stat == filter_status:
- selected = 'checked="checked"'
- else:
- selected = ""
- data += '<div class="%s"><h3><label><input type="radio" name="status" value="%s" %s/> %s</label></h3><p>%s projects</p></div>' % (stat, stat, selected, stat, len(affected))
-
- if filter_status == "any":
- selected = 'checked="checked"'
- else:
- selected = ''
- data += '<div><h3><label><input type="radio" name="status" value="any" %s/> Any</label></h3><p> </p></div>' % selected
-
- data += "</div>"
- data += '<div class="clear"/>'
- data += '<div><label for="prefix">Show only projects starting with</label> <input type="text" name="prefix" value="%s"/> <input type="submit" value="Set filter"/></div>' % filter_prefix
- data += '</form>'
-
- # Apply filters on builders
- for f in filters:
- builders = filter(f, builders)
- data += "<p>Showing %i projects matching the current filter.</p>" % len(builders)
-
- # Create detail view panels
- for builder in builders:
- activity = builder.getState()[0]
- data += '<div class="project %s %s"><h2>%s</h2>' % (self._builder_status(builder),
- activity, builder.getName())
- data += '<p>This builder is currently %s.</p>' % activity
- data += "<ul>"
- for x in range(1,6):
- build = builder.getBuild(-x)
- if build is None:
- break
- reason = build.reason
- started = datetime.datetime.fromtimestamp(build.started)
- started = started.strftime('%d %b, %H:%M')
- if build.source.changes:
- change = build.source.changes[0]
- reason = "%s by %s: %s" % (change.revision, change.who, change.comments)
- data += '<li style="color:%s;">%s – %s</li>' % (
- build.color, started, reason)
- data += "</ul>"
- data += "</div>"
-
- return data
-
-
-
-class ExtendedWebStatus(buildbot.status.web.baseweb.WebStatus):
-
- def __init__(self, *args, **kw):
- buildbot.status.web.baseweb.WebStatus.__init__(self, *args, **kw)
-
- def setupUsualPages(self):
- buildbot.status.web.baseweb.WebStatus.setupUsualPages(self)
- self.putChild('cruise', OverviewStatusResource())
-
- css = open(os.path.join(STATIC_DIR, 'cruise.css')).read()
- self.putChild('cruise.css', twisted.web.static.Data(css, 'text/css'))
-
- for image in ['headerbg.png', 'headerbg2.png', 'errorbg.png']:
- data = open(os.path.join(STATIC_DIR, image)).read()
- self.putChild(image, twisted.web.static.Data(data, 'image/png'))
-
Modified: gocept.bsquare/branches/pcardune-setup/update-config.sh
===================================================================
--- gocept.bsquare/branches/pcardune-setup/update-config.sh 2008-03-24 22:21:22 UTC (rev 84910)
+++ gocept.bsquare/branches/pcardune-setup/update-config.sh 2008-03-24 22:21:52 UTC (rev 84911)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -x
HOME=$1
BASE=$2
@@ -8,7 +8,7 @@
for PROJECT in `svn ls $BASE`; do
svn ls $BASE/$PROJECT/trunk/buildout.cfg &> /dev/null
if [ "$?" != "0" ]; then
- continue;
+ continue;
fi
echo $PROJECT >> project-updates
done
@@ -20,4 +20,4 @@
# Restart the master
make reconfig
-# vi:
+# vi:
\ No newline at end of file
More information about the Checkins
mailing list