From a72b73ca230fb5e60be197cfc611fe93f87de3ed Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Fri, 29 Dec 2017 11:49:34 +0100 Subject: lint builder "dispatches" on projects, rather than "invalidating" them first and use 'make'. --- buildbot/master.cfg | 68 ++++++++++++++++++++++++++++------------------------- 1 file changed, 36 insertions(+), 32 deletions(-) (limited to 'buildbot') diff --git a/buildbot/master.cfg b/buildbot/master.cfg index 6a37c77..c11c1c7 100644 --- a/buildbot/master.cfg +++ b/buildbot/master.cfg @@ -11,8 +11,8 @@ from buildbot.plugins import \ # 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. +# This is the dictionary that the buildmaster pays attention to. +# We also use a shorter alias to save typing. c = BuildmasterConfig = {} # Silence warning and allow very basic phoning home. @@ -20,9 +20,10 @@ c["buildbotNetUsageData"] = "basic" ####### WORKERS -# The 'workers' list defines the set of recognized workers. Each element is -# a Worker object, specifying a unique worker name and password. The same -# worker name and password must be configured on the worker. +# The 'workers' list defines the set of recognized workers. Each +# element is a Worker object, specifying a unique worker name and +# password. The same worker name and password must be configured +# on the worker. c["workers"] = [ worker.Worker("lcov-worker", "lcov-pass"), worker.Worker("selenium-worker", "selenium-pass"), @@ -32,19 +33,19 @@ c["workers"] = [ worker.Worker("lint-worker", "lint-pass"), worker.Worker("wallet-worker", "wallet-pass")] -# 'protocols' contains information about protocols which master will use for -# communicating with workers. You must define at least 'port' option that workers -# could connect to your master with this protocol. -# 'port' must match the value configured into the workers (with their -# --master option) +# 'protocols' contains information about protocols which master +# will use for communicating with workers. You must define at +# least 'port' option that workers could connect to your master +# with this protocol. 'port' must match the value configured into +# the workers (with their --master option) c["protocols"] = { "pb": { "port": "tcp:9989:interface=127.0.0.1"}} ####### CHANGESOURCES -# the 'change_source' setting tells the buildmaster how it should find out -# about source code changes. +# the 'change_source' setting tells the buildmaster how it should +# find out about source code changes. # NOTE: BB is bound to localhost ALLCS = changes.PBChangeSource(user="allcs", passwd="allcs") @@ -53,7 +54,8 @@ c["change_source"] = [ALLCS] ####### SCHEDULERS -# Configure the Schedulers, which decide how to react to incoming changes. +# Configure the Schedulers, which decide how to react to incoming +# changes. # Re-build documentation periodically @@ -141,9 +143,10 @@ c["schedulers"] = [ ####### BUILDERS -# The 'builders' list defines the Builders, which tell Buildbot how to perform a build: -# what steps, and which workers can execute them. Note that any particular build will -# only take place on one worker. +# The 'builders' list defines the Builders, which tell Buildbot +# how to perform a build: what steps, and which workers can execute +# them. Note that any particular build will only take place on +# one worker. def git_step(repo): return Git(repourl=repo, @@ -183,20 +186,18 @@ DEBUG_FACTORY.addStep(ShellCommand( descriptionDone="builder responded", command=["echo", "I'm here!"])) +def lint_dispatcher(project): + return "./lint_%s.sh" % project + LINT_FACTORY = util.BuildFactory() LINT_FACTORY.addStep(git_step( "git://git.taler.net/deployment.git")) LINT_FACTORY.addStep(ShellCommand( - name="invalidation", - description="checking changes", - descriptionDone="changes checked", - command=["./invalidate.sh", "--lint"], - workdir="build/taler-build")) -LINT_FACTORY.addStep(ShellCommand( - name="linting", - description="Linting..", - descriptionDone="Linted", - command=["make", "-f", "MakefileLint"], + name="Python linter", + description="linting Python", + descriptionDone="linting done", + command=util.Transform(lint_dispatcher, + util.Property("project")), workdir="build/taler-build")) LCOV_FACTORY = util.BuildFactory() @@ -287,7 +288,8 @@ DOC_FACTORY.addStep(ShellCommand( name="build docs", description="Building documentation.", descriptionDone="Documentation built.", - command=util.Transform(doc_dispatcher, util.Property("project")), + command=util.Transform(doc_dispatcher, + util.Property("project")), workdir="build/taler-build")) DEBUG_BUILDER = util.BuilderConfig( @@ -343,9 +345,10 @@ c["builders"] = [ ####### BUILDBOT SERVICES -# 'services' is a list of BuildbotService items like reporter targets. The -# status of each build will be pushed to these targets. buildbot/reporters/*.py -# has a variety to choose from, like IRC bots. +# 'services' is a list of BuildbotService items like reporter +# targets. The status of each build will be pushed to these +# targets. buildbot/reporters/*.py has a variety to choose from, +# like IRC bots. IRC = reporters.IRC( "irc.eu.freenode.net", @@ -391,7 +394,8 @@ c["www"] = { ####### DB URL c["db"] = { - # This specifies what database buildbot uses to store its state. You can leave - # this at its default for all but the largest installations. + # This specifies what database buildbot uses to store its + # state. You can leave this at its default for all but the + # largest installations. "db_url" : "sqlite:///state.sqlite", } -- cgit v1.2.3