[Qa-jenkins-scm] [jenkins.debian.net] 01/02: reproducible: remote_scheduler: add a -n option to avoid notification when the build finishes
Holger Levsen
holger at moszumanska.debian.org
Tue May 26 14:05:31 UTC 2015
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 38b8441d0382ffa170982c6ad56b5f1bc4561f5f
Author: Mattia Rizzolo <mattia at mapreri.org>
Date: Thu May 21 19:41:59 2015 +0200
reproducible: remote_scheduler: add a -n option to avoid notification when the build finishes
---
bin/reproducible_remote_scheduler.py | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/bin/reproducible_remote_scheduler.py b/bin/reproducible_remote_scheduler.py
index ebab903..0d69b84 100755
--- a/bin/reproducible_remote_scheduler.py
+++ b/bin/reproducible_remote_scheduler.py
@@ -16,8 +16,11 @@ parser = argparse.ArgumentParser(
description='Reschedule packages to re-test their reproducibility',
epilog='The build results will be announced on the #debian-reproducible' +
' IRC channel.')
-parser.add_argument('-a', '--artifacts', default=False, action='store_true',
- help='Save artifacts (for further offline study)')
+group = parser.add_mutually_exclusive_group()
+group.add_argument('-a', '--artifacts', default=False, action='store_true',
+ help='Save artifacts (for further offline study)')
+group.add_argument('-n', '--no-notify', default=False, action='store_true',
+ help='Do not notify the channel when the build finish')
parser.add_argument('-s', '--suite', required=True,
help='Specify the suite to schedule in')
parser.add_argument('-m', '--message', default='', nargs='+',
@@ -53,10 +56,12 @@ suite = scheduling_args.suite
reason = ' '.join(scheduling_args.message)
packages = scheduling_args.packages
artifacts = scheduling_args.artifacts
+notify = not scheduling_args.no_notify # note the notify vs no-notify
log.debug('Requester: ' + requester)
log.debug('Reason: ' + reason)
log.debug('Artifacts: ' + str(artifacts))
+log.debug('Notify: ' + str(notify))
log.debug('Architecture: ' + defaultarch)
log.debug('Suite: ' + suite)
log.debug('Packages: ' + ' '.join(packages))
@@ -131,13 +136,13 @@ to_schedule = []
save_schedule = []
for id in ids:
artifacts_value = 1 if artifacts else 0
- to_schedule.append((id, date, artifacts_value, requester))
+ to_schedule.append((id, date, artifacts_value, str(notify).lower(), requester))
save_schedule.append((id, requester, epoch))
log.debug('Packages about to be scheduled: ' + str(to_schedule))
query1 = '''REPLACE INTO schedule
(package_id, date_scheduled, date_build_started, save_artifacts, notify, scheduler)
- VALUES (?, ?, "", ?, "true", ?)'''
+ VALUES (?, ?, "", ?, ?, ?)'''
query2 = '''INSERT INTO manual_scheduler
(package_id, requester, date_request) VALUES (?, ?, ?)'''
--
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