[SCM] ci-tooling packaging branch, master, updated. 8fe5785fd2e67dd6583216e9c0f1d930731cb587
Harald Sitter
apachelogger-guest at moszumanska.debian.org
Tue May 12 08:29:49 UTC 2015
Gitweb-URL: http://git.debian.org/?p=pkg-kde/ci-tooling.git;a=commitdiff;h=381b374
The following commit has been merged in the master branch:
commit 381b37412343a12932b16b2eaf502eca8f390f43
Author: Harald Sitter <sitter at kde.org>
Date: Tue May 12 10:05:16 2015 +0200
implement proper upstream resolution in all_jobs_built
for stable we have stable builds being downstreams of unstable builds (
most notably frameworks), so the regex for all dist_type builds would not
actually yield all builds of interest.
from all dist_type builds we now get their upstreams, filter out
mgmt/merger and conduct the built check on all remaining ones (i.e. the
jobs that are in fact making up the pool of dist_type even when the type
is not what was requested)
---
kci/all_jobs_built.rb | 34 ++++++++++++++++++++++++++++++----
1 file changed, 30 insertions(+), 4 deletions(-)
diff --git a/kci/all_jobs_built.rb b/kci/all_jobs_built.rb
index 3ae54af..bd06ff1 100755
--- a/kci/all_jobs_built.rb
+++ b/kci/all_jobs_built.rb
@@ -25,17 +25,43 @@ dist = ENV.fetch('DIST')
type = ENV.fetch('TYPE')
@log.unknown 'Checking if all relevant jobs are built.'
-# FIXME: this technically doesn't take unstable into account when promoting
-# stable
job_name_queue = Queue.new(Jenkins.job.list("^#{dist}_#{type}_.*"))
+all_relevant_jobs_queue = Queue.new
+
+# Gather up all upstreams and build a super-list of the jobs we want and
+# their upstreams.
+ at log.unknown 'Getting jobs and their upstreams.'
+BlockingThreadPool.run do
+ until job_name_queue.empty?
+ name = job_name_queue.pop(true)
+ Retry.retry_it(times: 5) do
+ upstreams = Jenkins.job.get_upstream_projects(name)
+ upstreams.each { |u| all_relevant_jobs_queue << u['name'] }
+ all_relevant_jobs_queue << name
+ end
+ end
+end
+
+# Filter out mgmt clutter, duplicates etc.
+ at log.unknown 'Filtering relevant jobs.'
+relevant_jobs = all_relevant_jobs_queue.to_a
+relevant_jobs.reject! do |j|
+ next true if j.start_with?('mgmt_')
+ next true if j.start_with?('merger_')
+ false
+end
+relevant_jobs.compact!
+relevant_jobs.uniq!
+relevant_jobs_queue = Queue.new(relevant_jobs)
# Check status of the jobs through a very simply threaded queue.
# This allows $threadcount concurrent connections which is heaps
# faster than doing this sequentially. In particular when run
# outside localhost.
+ at log.unknown 'Checking job status.'
BlockingThreadPool.run do
- until job_name_queue.empty?
- name = job_name_queue.pop(true)
+ until relevant_jobs_queue.empty?
+ name = relevant_jobs_queue.pop(true)
Retry.retry_it(times: 5) do
status = Jenkins.job.status(name)
queued = Jenkins.client.queue.list.include?(name)
--
ci-tooling packaging
More information about the pkg-kde-commits
mailing list