summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorParménides GV <parmegv@sdf.org>2015-08-03 23:38:16 +0200
committerParménides GV <parmegv@sdf.org>2015-08-03 23:38:16 +0200
commit46d93fe4115842471b1544803d78605b4fa035b6 (patch)
treecb57d368f6ef4acacd605fd28da346a53c1856a0
parent4b1501ca30e7e490c8c445785bd70f48e7782a07 (diff)
parent26974a59fdb833a1860a8aa45a4287000e30e3a7 (diff)
Merge branch 'feature/7327-modify-pip-requirements-to-produce-and-install-from-wheels'
-rw-r--r--master.cfg34
1 files changed, 33 insertions, 1 deletions
diff --git a/master.cfg b/master.cfg
index 95b66c5..418f98b 100644
--- a/master.cfg
+++ b/master.cfg
@@ -71,6 +71,10 @@ for repo_name, repo_branch, _, _ in REPOS:
name="force_build_of_" + repo_name,
builderNames=['builder_' + repo_name]))
+c['schedulers'].append(ForceScheduler(
+ name="force_build_of_wheels",
+ builderNames=['builder_wheels']))
+
####### BUILDERS
# The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
@@ -84,7 +88,7 @@ from buildbot.config import BuilderConfig
def add_repo_to_factory(factory, repo_name, git_branch, namespace, venv_name):
install_requirements = 'pkg/pip_install_requirements.sh'
- install_requirements_tests = "if [ -f pkg/requirements-testing.pip ]; then pip install --upgrade -r pkg/requirements-testing.pip; fi"
+ install_requirements_tests = "if [ -f pkg/requirements-testing.pip ]; then pkg/pip_install_requirements.sh --testing; fi"
install = "python setup.py develop"
workdir = "workdir-" + repo_name
@@ -142,11 +146,39 @@ def create_builder(repo_name):
return BuilderConfig(name=builder_name, slavenames=[localhost_slave], factory=factory)
+def make_wheel_builder():
+ builder_name = "builder_wheels"
+ venv_name = "virtualenv_wheels"
+ factory = BuildFactory()
+
+ generate_wheels = 'pkg/generate_wheels.sh'
+ sandbox_path_top = {'PATH': "./" + venv_name + '/bin' + ':${PATH}'}
+ sandbox_path = {'PATH': "../" + venv_name + '/bin' + ':${PATH}'}
+ sandbox_path_soledad = {'PATH': "../../" + venv_name + '/bin/' + ':${PATH}'}
+
+ factory.addStep(ShellCommand(command=["virtualenv", "--python=python2", venv_name], haltOnFailure=True, workdir=".", name="Create new virtualenv"))
+ factory.addStep(ShellCommand(command=['pip', 'install', '-U', 'wheel'], env=sandbox_path_top, haltOnFailure=True, workdir=".", name="Install wheels"))
+ for repo_name, git_branch, _, _ in REPOS:
+ repo_url = github_repo_url(repo_name)
+ workdir = "workdir-"+repo_name
+ factory.addStep(
+ Git(repourl=repo_url, branch=git_branch, workdir=workdir, mode='incremental', method='clean', haltOnFailure=True, name="Pull " + repo_url))
+ if 'soledad' in repo_name:
+ for subpackage in ["common", "client", "server"]:
+ factory.addStep(
+ ShellCommand(command=generate_wheels, env=sandbox_path_soledad, haltOnFailure=True, workdir=workdir+'/'+subpackage, name="reqs: " + repo_name+"."+subpackage))
+ else:
+ factory.addStep(
+ ShellCommand(command=generate_wheels, env=sandbox_path, haltOnFailure=True, workdir=workdir, name="reqs: " + repo_name))
+
+ return BuilderConfig(name=builder_name, slavenames=[localhost_slave], factory=factory)
+
c['builders'] = []
for repo_name, _, _, _ in REPOS:
c['builders'].append(create_builder(repo_name))
+c['builders'].append(make_wheel_builder())
####### STATUS TARGETS
# 'status' is a list of Status Targets. The results of each build will be