Skip to content
This repository has been archived by the owner on May 13, 2020. It is now read-only.

Commit

Permalink
save current state
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Groszer committed Aug 22, 2012
1 parent 364d1ae commit 581ddac
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 16 deletions.
72 changes: 56 additions & 16 deletions master.cfg
Expand Up @@ -82,6 +82,10 @@ class SVN(source.SVN):
return None


class Git(source.Git):
show_revno = False # the LastChange step does it better


class LastChange(shell.ShellCommand):

command = ['svn', 'log', '--limit', '1']
Expand Down Expand Up @@ -113,6 +117,37 @@ class LastChange(shell.ShellCommand):
return None


class LastChangeGit(shell.ShellCommand):

command = ['git', 'log', '-1']
name = 'git-last-change'
description = ['git log -1']
descriptionDone = ['last change']

# xxx hardcoded
url_template = 'https://github.com/buildout/buildout/commit/%s'

def createSummary(self, log):
log_text = log.getText()
revno = self.extractRevno(log_text)
if revno:
text = self.formatRevno(revno)
self.descriptionDone = self.descriptionDone + [text]

def formatRevno(self, revno):
text = revno
if self.url_template:
url = self.url_template % revno
text = '<a class="revlink" href="%s">%s</a>' % (url, text)
return text

def extractRevno(self, log_text):
for line in log_text.splitlines():
if line.startswith('commit '):
return line.split()[1]
return None


class SVNInfo(shell.ShellCommand):

command = ['svn', 'info']
Expand Down Expand Up @@ -653,19 +688,21 @@ def get_same_platforms(bits, platforms, exclude):
platform.majorVersion, platform.python))
return data

def zc_buildout_dev_builder(name, slavename, platform, locks):

def zc_buildout_dev_builder(name, slavename, platform, locks, branch='HEAD'):
builddir = name.replace(' ', '_')
f = factory.BuildFactory()
f.addStep(SVN(
svnurl="svn://svn.zope.org/repos/main/zc.buildout/trunk",
f.addStep(Git(
repourl="git://github.com/buildout/buildout.git",
haltOnFailure=True,
mode="copy"))
mode="copy",
branch=branch))

lc = LastChange()
lc.url_template = 'http://zope3.pov.lt/trac/log/zc.buildout?rev=%s'
lc = LastChangeGit()
#lc.url_template = 'http://zope3.pov.lt/trac/log/zc.buildout?rev=%s'
f.addStep(lc)

f.addStep(SVNInfo())
#f.addStep(SVNInfo())

#f.addStep(shell.ShellCommand(
# command=["/usr/bin/virtualenv", "--distribute", "-p", python, "--no-site-packages", "sandbox"],
Expand All @@ -676,10 +713,10 @@ def zc_buildout_dev_builder(name, slavename, platform, locks):
#actually bootstrap and buildout in one step
cmd = platform.python + " dev.py"
f.addStep(shell.ShellCommand(
command=platform.withcompiler % cmd,
command=cmd,
haltOnFailure=True,
name="bootstrap",
description="bootstrap"))
name="dev.py",
description="dev.py"))
#f.addStep(shell.ShellCommand(
# command="%s" % platform.buildout,
# haltOnFailure=True,
Expand All @@ -693,7 +730,7 @@ def zc_buildout_dev_builder(name, slavename, platform, locks):
cmd = r"bin\test.exe --exit-with-status -1"
f.addStep(Test(
#command=[r"bin\test.exe", "--exit-with-status", "-1"],
command=platform.withcompiler % cmd,
command=cmd,
haltOnFailure=False,
name="test",
description="test trunk"))
Expand All @@ -705,20 +742,22 @@ def zc_buildout_dev_builder(name, slavename, platform, locks):

ZC_BUILDOUT_PLATFORMS = CLEAN_PLATFORMS.copy()
del ZC_BUILDOUT_PLATFORMS['py_244_win32']
del ZC_BUILDOUT_PLATFORMS['py_254_win32']

def setup_zc_buildout_dev_tests(slow_lock, hour=02, minute=20):

def setup_zc_buildout_dev_tests(slow_lock, hour=02, minute=20, branch='HEAD'):
#hour = 02
#minute = 20
builders = []
for pname in sorted(ZC_BUILDOUT_PLATFORMS.keys()):
platform = ZC_BUILDOUT_PLATFORMS[pname]
name = "zc_buildout_dev %s" % platform.name
name = "zc_buildout_dev %s %s" % (platform.name, branch)
builders.append(name)
c['builders'].append(
zc_buildout_dev_builder(name, 'local', platform, [slow_lock]))
zc_buildout_dev_builder(name, 'local', platform, [slow_lock], branch))

c['schedulers'].append(
Nightly( "%s_nightly" % name, [name], hour=hour, minute=minute))
Nightly("%s_nightly" % name, [name], hour=hour, minute=minute))
minute += 1

c['status'].append(
Expand Down Expand Up @@ -1121,7 +1160,8 @@ setupEggBuild(slow_lock) #every 30 mins
setupZTK_dev_tests(slow_lock, hour=20, minute=10)
setupZTK_10_tests(slow_lock, hour=20, minute=20)
setupZTK_11_tests(slow_lock, hour=20, minute=30)
#setup_zc_buildout_dev_tests(slow_lock, hour=20, minute=40)
setup_zc_buildout_dev_tests(slow_lock, hour=20, minute=40, branch='master')
setup_zc_buildout_dev_tests(slow_lock, hour=20, minute=40, branch='1.6.x')
setup_ZODB_dev_tests(slow_lock, hour=20, minute=50)
setup_BB_dev_tests(slow_lock, hour=20, minute=55)

Expand Down
2 changes: 2 additions & 0 deletions project-list.cfg
Expand Up @@ -94,6 +94,7 @@ zope.app.rotterdam
zope.app.schema
zope.app.security
zope.app.testing
zope.app.twisted
zope.app.wsgi
zope.app.zcmlfiles
zope.app.zopeappgenerations
Expand All @@ -107,6 +108,7 @@ z3c.breadcrumb
z3c.configurator
z3c.contents
z3c.coverage
z3c.datagenerator
z3c.form
z3c.formui
z3c.json
Expand Down

0 comments on commit 581ddac

Please sign in to comment.