[Qa-jenkins-scm] [jenkins.debian.net] 02/03: reproducible Debian: Split. No functional change.

Holger Levsen holger at layer-acht.org
Mon May 22 16:26:01 UTC 2017


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit db6443fa784e8ae963e3d091de1cb0c776950d5b
Author: Daniel Shahaf <danielsh at apache.org>
Date:   Mon May 22 15:25:00 2017 +0000

    reproducible Debian: Split.  No functional change.
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 bin/reproducible_remote_scheduler.py | 28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

diff --git a/bin/reproducible_remote_scheduler.py b/bin/reproducible_remote_scheduler.py
index bc0bb0c..09390b9 100755
--- a/bin/reproducible_remote_scheduler.py
+++ b/bin/reproducible_remote_scheduler.py
@@ -13,7 +13,7 @@ import time
 import argparse
 from sqlalchemy import sql
 
-def main():
+def parse_known_args():
     parser = argparse.ArgumentParser(
         description='Reschedule packages to re-test their reproducibility',
         epilog='The build results will be announced on the #debian-reproducible'
@@ -142,6 +142,8 @@ def main():
         results = query_db(query.format_map(formatter))
         results = [x for (x,) in results]
         log.info('Selected packages: ' + ' '.join(results))
+        # Note: this .extend() operation modifies scheduling_args.packages, which
+        #       is used by rest()
         packages.extend(results)
 
     if len(packages) > 50 and notify:
@@ -160,6 +162,26 @@ def main():
     if notify_on_start:
         log.info('The channel will be notified when the build starts')
 
+    return scheduling_args, requester
+
+def rest(scheduling_args, requester):
+    # these are here as an hack to be able to parse the command line in parse_args()
+    from reproducible_common import *
+
+    # Shorter names
+    suite = scheduling_args.suite
+    arch = scheduling_args.architecture
+    reason = scheduling_args.message
+    issue = scheduling_args.issue
+    status = scheduling_args.status
+    built_after = scheduling_args.after
+    built_before = scheduling_args.before
+    packages = scheduling_args.packages
+    artifacts = scheduling_args.keep_artifacts
+    notify = scheduling_args.notify
+    notify_on_start = scheduling_args.noisy
+    dry_run = scheduling_args.dry_run
+
     ids = []
     pkgs = []
 
@@ -305,5 +327,9 @@ def main():
 
     generate_schedule(arch)  # update the HTML page
 
+def main():
+    scheduling_args, requester = parse_args()
+    rest(scheduling_args, requester)
+
 if __name__ == '__main__':
     main()

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list