[SCM] ci-tooling packaging branch, master, updated. 0ada158abc2d5ef521d2c5f509e59de5f1f0e374

Harald Sitter apachelogger-guest at moszumanska.debian.org
Tue Feb 24 09:26:07 UTC 2015


Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=0ada158

The following commit has been merged in the master branch:
commit 0ada158abc2d5ef521d2c5f509e59de5f1f0e374
Author: Harald Sitter <sitter at kde.org>
Date:   Tue Feb 24 10:25:56 2015 +0100

    move all_jobs_built to retry module
---
 kci/all_jobs_built.rb | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/kci/all_jobs_built.rb b/kci/all_jobs_built.rb
index 141b477..4360042 100644
--- a/kci/all_jobs_built.rb
+++ b/kci/all_jobs_built.rb
@@ -3,6 +3,7 @@
 Dir.chdir('/tmp/') # Containers by default have a bugged out pwd, force /tmp.
 
 require_relative 'lib/jenkins'
+require_relative 'lib/retry'
 require_relative 'lib/thread_pool'
 
 QUALIFIER_STATES = %w(success unstable)
@@ -26,15 +27,9 @@ job_names.each { |j| job_name_queue << j }
 BlockingThreadPool.run do
   until job_name_queue.empty?
     name = job_name_queue.pop(true)
-    retries = 5
-    begin
+    Retry.retry_it(times: 5) do
       abort(name) unless QUALIFIER_STATES.include?(Jenkins.job.status(name))
       abort(name) if Jenkins.client.queue.list.include?(name)
-    rescue => e
-      raise e if retries == 0
-      print "Error on job #{name} :: #{e}
"
-      retries -= 1
-      retry
     end
   end
 end

-- 
ci-tooling packaging



More information about the pkg-kde-commits mailing list