summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorDaniel Shahaf <danielsh@apache.org>2017-05-22 15:25:00 +0000
committerHolger Levsen <holger@layer-acht.org>2017-05-22 18:25:51 +0200
commitdb6443fa784e8ae963e3d091de1cb0c776950d5b (patch)
tree0838db07f3f34058ed5d150c0e23776393fd9fda /bin
parent1d51206a4fee82cb9515561ce556c69ed4d857c8 (diff)
downloadjenkins.debian.net-db6443fa784e8ae963e3d091de1cb0c776950d5b.tar.xz
reproducible Debian: Split. No functional change.
Signed-off-by: Holger Levsen <holger@layer-acht.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_remote_scheduler.py28
1 files changed, 27 insertions, 1 deletions
diff --git a/bin/reproducible_remote_scheduler.py b/bin/reproducible_remote_scheduler.py
index bc0bb0cc..09390b95 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()