[Qa-jenkins-scm] [jenkins.debian.net] 04/06: reproducible: remote_scheduler: add logic to avoid people scheduling >50 packages with irc notification
Holger Levsen
holger at moszumanska.debian.org
Sun Jun 14 20:37:02 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 54b196c4f43bba4e9e2b6d370e2f301a5a7c1831
Author: Mattia Rizzolo <mattia at mapreri.org>
Date: Sun Jun 14 20:07:54 2015 +0200
reproducible: remote_scheduler: add logic to avoid people scheduling >50 packages with irc notification
---
bin/reproducible_remote_scheduler.py | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/bin/reproducible_remote_scheduler.py b/bin/reproducible_remote_scheduler.py
index bee9a74..6a6724f 100755
--- a/bin/reproducible_remote_scheduler.py
+++ b/bin/reproducible_remote_scheduler.py
@@ -38,9 +38,10 @@ from reproducible_html_indexes import generate_schedule
class bcolors:
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
+ RED = '\033[91m'
GOOD = '\033[92m'
WARN = '\033[93m' + UNDERLINE
- FAIL = '\033[91m' + BOLD + UNDERLINE
+ FAIL = RED + BOLD + UNDERLINE
ENDC = '\033[0m'
@@ -78,6 +79,14 @@ if suite not in SUITES:
log.critical('Please chose between ' + ', '.join(SUITES))
sys.exit(1)
+if len(packages) > 50 and notify:
+ log.critical(bcolors.RED + bcolors.BOLD)
+ call(['figlet', 'No.'])
+ log.critical(bcolors.FAIL + 'Do not reschedule more than 50 packages ' +
+ 'with notification.\nIf you really need to spam the IRC ' +
+ 'channel this much use a loop to achive that.' + bcolors.ENDC)
+ sys.exit(1)
+
if scheduling_args.artifacts:
log.info('The artifacts of the build(s) will be saved to the location '
'mentioned at the end of the build log(s).')
--
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