aboutsummaryrefslogtreecommitdiff
path: root/tatt
diff options
context:
space:
mode:
authorMichael Palimaka <kensington@gentoo.org>2016-11-07 01:50:45 +1100
committerMichael Palimaka <kensington@gentoo.org>2016-12-22 06:10:12 +1100
commitefeb3e57dd0344ae3ec0d296ddeebf57e0a6d4a2 (patch)
treef076e59c00fd048f06746fb9c8825174135d1b0a /tatt
parentUpdate commit template for git with thin manifests. (diff)
downloadtatt-efeb3e57dd0344ae3ec0d296ddeebf57e0a6d4a2.tar.gz
tatt-efeb3e57dd0344ae3ec0d296ddeebf57e0a6d4a2.tar.bz2
tatt-efeb3e57dd0344ae3ec0d296ddeebf57e0a6d4a2.zip
Replace hard-coded bug update script with brand new template.
In addition to reporting that stabilisation has been completed on the target arch, this new template also takes care of removing the arch team from CC and closes the bug if necessary.
Diffstat (limited to 'tatt')
-rw-r--r--tatt/dot-tatt-spec4
-rw-r--r--tatt/scriptwriter.py13
2 files changed, 11 insertions, 6 deletions
diff --git a/tatt/dot-tatt-spec b/tatt/dot-tatt-spec
index 68ef223..020fbda 100644
--- a/tatt/dot-tatt-spec
+++ b/tatt/dot-tatt-spec
@@ -10,4 +10,6 @@ rdeps=integer(0,512,default=10)
usecombis=integer(0,512,default=12)
repodir=string(default="./gentoo-x86")
tinderbox-url=string(default="http://qa-reports.gentoo.org/output/genrdeps/rindex/")
-safedir=string(default="") \ No newline at end of file
+safedir=string(default="")
+bugzilla-url=string(default="https://bugs.gentoo.org")
+bugzilla-key=string(default="")
diff --git a/tatt/scriptwriter.py b/tatt/scriptwriter.py
index 864f45b..9874217 100644
--- a/tatt/scriptwriter.py
+++ b/tatt/scriptwriter.py
@@ -110,12 +110,15 @@ def writesucessreportscript (job, config):
reportname = (job.name + ".report")
if os.path.isfile(outfilename):
print("WARNING: Will overwrite " + outfilename)
+ try:
+ updatebugtemplate=open(config['template-dir'] + "updatebug", 'r')
+ except IOError:
+ print("updatebug not found in " + config['template-dir'])
+ sys.exit(1)
+ updatebug=updatebugtemplate.read().replace("@@ARCH@@", config['arch'])
+ updatebug=updatebug.replace("@@BUG@@", job.bugnumber)
outfile = open(outfilename,'w')
- outfile.write("#!/bin/sh" + '\n')
- outfile.write("if grep failed " + reportname + " >> /dev/null; then echo Failure found;\n")
- succmess = config['successmessage'].replace("@@ARCH@@", config['arch'])
- outfile.write("else bugz modify " + job.bugnumber + ' -c' + "\"" + succmess + "\";\n")
- outfile.write("fi;")
+ outfile.write(updatebug)
os.fchmod(outfile.fileno(),484)
outfile.close()
print("Success Report script written to " + outfilename)