]> git.apps.os.sepia.ceph.com Git - autobuild-ceph.git/commitdiff
fabfile: create the branches-local file on precise and centos6 hosts 59/head
authorKefu Chai <tchaikov@gmail.com>
Mon, 10 Aug 2015 15:38:47 +0000 (23:38 +0800)
committerKefu Chai <tchaikov@gmail.com>
Tue, 11 Aug 2015 08:01:08 +0000 (16:01 +0800)
* also add a task named `filter_branches` to do this job

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
fabfile.py

index 66949346d85e77fcea37fade8b159b2ad7939b58..a72b94e23f2ab7b5959d248dad42c3e892aa4736 100644 (file)
@@ -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.