From 20ef0d1ab488961123639bd5631c0bc446875817 Mon Sep 17 00:00:00 2001 From: Derwei Chan Date: Mon, 11 May 2015 11:21:48 -0400 Subject: [PATCH] Fixes cctray to look for exact pipeline/stage/job name. [#91645958] Signed-off-by: Brenda Chan --- scripts/cctray.check | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/cctray.check b/scripts/cctray.check index 410c9d7..45b4526 100755 --- a/scripts/cctray.check +++ b/scripts/cctray.check @@ -42,10 +42,12 @@ class CCTray end def latest_status - name = [@pipeline, @stage, @job].compact.join(" :: ") + name = [@pipeline, @stage, @job].compact projects = @feed.xpath('//Project').select do |proj| - proj.attr('name').downcase.include?(name.downcase) + name.each_with_index do |attribute, index| + break unless proj.attr('name').downcase.split(' :: ')[index] == attribute.downcase + end end CCTrayMultiProjectStatus.new(projects)