From a6dcf4d71259405b4786f36d90ade952136ee6cc Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Tue, 19 Feb 2013 13:58:34 +0400 Subject: [PATCH] #757: create container when tests failed --- lib/abf_worker/rpm_worker_observer.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/abf_worker/rpm_worker_observer.rb b/lib/abf_worker/rpm_worker_observer.rb index 4fb598488..6b83f30e8 100644 --- a/lib/abf_worker/rpm_worker_observer.rb +++ b/lib/abf_worker/rpm_worker_observer.rb @@ -18,7 +18,6 @@ module AbfWorker when COMPLETED subject.build_success subject.now_publish if subject.auto_publish? - subject.publish_container if subject.auto_create_container? when FAILED subject.build_error item.update_attributes({:status => BuildList::BUILD_ERROR}) @@ -31,7 +30,10 @@ module AbfWorker subject.tests_failed end - item.update_attributes({:status => BuildList::SUCCESS}) if [TESTS_FAILED, COMPLETED].include?(status) + if [TESTS_FAILED, COMPLETED].include?(status) + item.update_attributes({:status => BuildList::SUCCESS}) + subject.publish_container if subject.auto_create_container? + end end protected