From 097322be25cd021e4b8f6988980d3fd81df4adcc Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Tue, 18 Nov 2014 22:00:56 -0500 Subject: [PATCH] Add support to log gearman client to filter on build-queue This commit adds a new job filter to the gearman client to filter based on the build queue. This is used for the subunit jobs which we don't want to run on check jobs. Change-Id: If81fe98d8d67bb718c53a963695a7d06f5f6625d --- modules/log_processor/files/log-gearman-client.py | 5 +++++ .../openstack_project/files/logstash/jenkins-log-client.yaml | 2 ++ 2 files changed, 7 insertions(+) diff --git a/modules/log_processor/files/log-gearman-client.py b/modules/log_processor/files/log-gearman-client.py index e699796402..03aa038b51 100644 --- a/modules/log_processor/files/log-gearman-client.py +++ b/modules/log_processor/files/log-gearman-client.py @@ -72,6 +72,11 @@ class EventProcessor(threading.Thread): if (job_filter and not re.match(job_filter, out_event['fields']['build_name'])): continue + build_queue_filter = fileopts.get('build-queue-filter') + if (build_queue_filter and + not re.match(build_queue_filter, + out_event['fields']['build_queue'])): + continue output['source_url'] = source_url output['retry'] = fileopts.get('retry-get', False) output['event'] = out_event diff --git a/modules/openstack_project/files/logstash/jenkins-log-client.yaml b/modules/openstack_project/files/logstash/jenkins-log-client.yaml index 4d872aab51..30ff209870 100644 --- a/modules/openstack_project/files/logstash/jenkins-log-client.yaml +++ b/modules/openstack_project/files/logstash/jenkins-log-client.yaml @@ -15,8 +15,10 @@ subunit-files: - name: logs/testrepository.subunit retry-get: True job-filter: 'gate-(tempest|grenade)-dsvm.*' + build-queue-filter: 'gate' - name: logs/old/testrepository.subunit job-filter: 'gate-grenade-dsvm.*' + build-queue-filter: 'gate' # List of files to source logs from. source-files: