[Qa-jenkins-scm] [jenkins.debian.net] 03/06: reproducible: remote_scheduler: add a --message switch to get convey a reason for the rescheduling to the channel
Holger Levsen
holger at moszumanska.debian.org
Fri May 8 10:12: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 2c17c478b6df442bcf60cc27014fe55f7a5f0ce2
Author: Mattia Rizzolo <mattia at mapreri.org>
Date: Tue May 5 21:47:08 2015 +0200
reproducible: remote_scheduler: add a --message switch to get convey a reason for the rescheduling to the channel
---
bin/reproducible_remote_scheduler.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/bin/reproducible_remote_scheduler.py b/bin/reproducible_remote_scheduler.py
index 2f51d24..fcd3856 100755
--- a/bin/reproducible_remote_scheduler.py
+++ b/bin/reproducible_remote_scheduler.py
@@ -20,6 +20,9 @@ parser.add_argument('-a', '--artifacts', default=False, action='store_true',
help='Save artifacts (for further offline study)')
parser.add_argument('-s', '--suite', required=True,
help='Specify the suite to schedule for')
+parser.add_argument('-m', '--message', default='',
+ help='A text to be sent to the channel while notifing ' +
+ 'the scheduling')
parser.add_argument('packages', metavar='package', nargs='+',
help='list of packages to reschedule')
scheduling_args = parser.parse_known_args()[0]
@@ -47,10 +50,12 @@ except KeyError:
'trouble with that.' + bcolors.ENDC)
sys.exit(1)
suite = scheduling_args.suite
+reason = scheduling_args.message
packages = scheduling_args.packages
artifacts = scheduling_args.artifacts
log.debug('Requester: ' + requester)
+log.debug('Reason: ' + reason)
log.debug('Artifacts: ' + str(artifacts))
log.debug('Architecture: ' + defaultarch)
log.debug('Suite: ' + suite)
@@ -82,7 +87,10 @@ packages_txt = ' packages ' if len(packages) > 1 else ' package '
artifacts_txt = ' - artifacts will be preserved' if artifacts else ''
message = str(len(ids)) + packages_txt + 'scheduled in ' + suite + ' by ' + \
- requester + ': ' + ' '.join(packages)[0:256] + blablabla + artifacts_txt
+ requester
+if reason:
+ message += ' (reason: ' + reason + ')'
+message += ': ' + ' '.join(packages)[0:256] + blablabla + artifacts_txt
# these packages are manually scheduled, so should have high priority,
--
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