diff options
author | Parménides GV <parmegv@sdf.org> | 2015-08-03 17:29:04 +0200 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2015-08-03 21:51:09 +0200 |
commit | 029b9bbe035a4505a794a47aef8249991f783ce3 (patch) | |
tree | 88ac0d58d8fb321b3cf7d2acdab1004d9d522526 | |
parent | 4b1501ca30e7e490c8c445785bd70f48e7782a07 (diff) |
Builder to make wheels
Testing with parmegv's github account, because some scripts must be
modified. Once the pull requests are polished and merged, we'll get back
to leapcode and develop.
-rw-r--r-- | master.cfg | 38 |
1 files changed, 35 insertions, 3 deletions
@@ -38,8 +38,8 @@ c['protocols'] = {'pb': {'port': PORT_MASTER}} # the 'change_source' setting tells the buildmaster how it should find out # about source code changes. -github_repos_username = 'leapcode' -default_branch = 'develop' +github_repos_username = 'parmegv' +default_branch = 'feature/use-wheels-installing-requirements' order_repos_index = 2 REPOS=[ ('leap_pycommon', default_branch, 1, 'leap.common'), @@ -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_testing.sh; 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 |