taler-deployment

Deployment scripts and configuration files
Log | Files | Refs | README

commit c045d821e96377e75d1f5c68db5f76ff4f26f71c
parent aec67d1d9af4dc155d759571f5ec69138fd1dcc4
Author: buckE <buckE@disroot.org>
Date:   Wed, 17 Jun 2020 05:33:23 +0000

moved convenience functions to top

Diffstat:
Mbuildbot/master.cfg | 85+++++++++++++++++++++++++++++++++++++++++--------------------------------------
1 file changed, 44 insertions(+), 41 deletions(-)

diff --git a/buildbot/master.cfg b/buildbot/master.cfg @@ -37,6 +37,50 @@ c = BuildmasterConfig = {} # Silence warning and allow very basic phoning home. c["buildbotNetUsageData"] = "basic" +### Functions + +# Convenience function that checks out a Git repository. +# First argument is the URL of the Git to clone, second +# the desired branch. Default is 'master'. +def git_step(repo,target_branch="master"): + return Git( + repourl=repo, + mode="full", + method="fresh", + logEnviron=False, + alwaysUseLatest=True, + haltOnFailure=True, + branch=target_branch + ) + + +# Convenience function that runs 'make check' in a +# directory of the code inside of a netjail. +def jailed_check(package,srcdir): + return ShellCommand( + name="Test of " + srcdir + " in " + package, + description="Testing " + srcdir + " in " + package, + descriptionDone="Pass", + command=["sudo", "/usr/local/bin/netjail.sh", "/home/integrationtest/deployment/buildbot/with-postgres.sh", "make", "check"], + workdir="../../sources/" + package + "/src/" + srcdir + ) + +# Convenience function that checks out the deployment. +def update_deployment(factory): + factory.addStep(ShellCommand( + name="clean old deployment", + description="cleaning previous deployment repository", + descriptionDone="Deployment removed", + command=["rm", "-rf", "deployment"], + workdir="../.." + )) + factory.addStep(ShellCommand( + name="update deployment", + description="fetching latest deployment repository", + descriptionDone="Deployment updated", + command=["git", "clone", "git://git.taler.net/deployment"], + workdir="../.." + )) # Create a FACTORY with a deployment.git checkout as the first step. def create_factory_with_deployment(): @@ -408,48 +452,7 @@ c["schedulers"] = [ # one worker. -# Convenience function that checks out a Git repository. -# First argument is the URL of the Git to clone, second -# the desired branch. Default is 'master'. -def git_step(repo,target_branch="master"): - return Git( - repourl=repo, - mode="full", - method="fresh", - logEnviron=False, - alwaysUseLatest=True, - haltOnFailure=True, - branch=target_branch - ) - - -# Convenience function that runs 'make check' in a -# directory of the code inside of a netjail. -def jailed_check(package,srcdir): - return ShellCommand( - name="Test of " + srcdir + " in " + package, - description="Testing " + srcdir + " in " + package, - descriptionDone="Pass", - command=["sudo", "/usr/local/bin/netjail.sh", "/home/integrationtest/deployment/buildbot/with-postgres.sh", "make", "check"], - workdir="../../sources/" + package + "/src/" + srcdir - ) -# Convenience function that checks out the deployment. -def update_deployment(factory): - factory.addStep(ShellCommand( - name="clean old deployment", - description="cleaning previous deployment repository", - descriptionDone="Deployment removed", - command=["rm", "-rf", "deployment"], - workdir="../.." - )) - factory.addStep(ShellCommand( - name="update deployment", - description="fetching latest deployment repository", - descriptionDone="Deployment updated", - command=["git", "clone", "git://git.taler.net/deployment"], - workdir="../.." - )) # Factory to update the buildmaster itself.