From: Kefu Chai Date: Mon, 10 Aug 2015 15:38:47 +0000 (+0800) Subject: fabfile: create the branches-local file on precise and centos6 hosts X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F59%2Fhead;p=autobuild-ceph.git fabfile: create the branches-local file on precise and centos6 hosts * also add a task named `filter_branches` to do this job Signed-off-by: Kefu Chai --- diff --git a/fabfile.py b/fabfile.py index 6694934..a72b94e 100644 --- a/fabfile.py +++ b/fabfile.py @@ -4,6 +4,12 @@ from fabric.contrib.files import exists, append, sed import os import sys +env.roledefs['pre_cxx11'] = [ + 'ubuntu@gitbuilder-ceph-deb-precise-amd64-basic.front.sepia.ceph.com', + 'ubuntu@gitbuilder-ceph-deb-precise-amd64-notcmalloc.front.sepia.ceph.com', + 'ubuntu@gitbuilder-ceph-rpm-centos6-5-amd64-basic.front.sepia.ceph.com', +] + env.roledefs['gitbuilder_auto'] = [ 'ubuntu@gitbuilder-ceph-deb-trusty-amd64-blkin.front.sepia.ceph.com', 'ubuntu@gitbuilder-ceph-deb-precise-amd64-basic.front.sepia.ceph.com', @@ -926,6 +932,23 @@ def authorize_ssh_keys(): for key in keys: run('grep -q "%s" %s || echo "%s" >> %s' % (key, keyfile, key, keyfile)) +@roles('pre_cxx11') +def install_filter_branches(): + """install a filter-branches file so old builders will only look at branches before Infernalis + """ + filter_branches_path = '/srv/autobuild-ceph/filter-branches' + # only keep the branches with following keywords in it. + pre_cxx11_branches = ['hammer', + 'giant', + 'firefly', + 'emperor', + 'dumpling'] + sudo('touch {filter}'.format(filter=filter_branches_path)) + append(filter_branches_path, + '\n'.join(pre_cxx11_branches), + use_sudo=True) + + def install_git(): # Install newer git from source # for bug fixes.