Created
March 31, 2016 09:39
-
-
Save spodkowinski/0e3e9b7d9b010436fe56a357573cae4b to your computer and use it in GitHub Desktop.
Very simple script to create a Jira table for Cassandra cassci results
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| # example usage: ./gentable.py spodkowinski CASSANDRA-9325-2.2 CASSANDRA-9325-3.0 CASSANDRA-9325-trunk | |
| import sys, re | |
| if len(sys.argv) < 3: | |
| sys.stderr.write('Usage: gentable username branches ..\n') | |
| sys.exit(1) | |
| username = sys.argv[1] | |
| headers = [] | |
| branches = [] | |
| dtests = [] | |
| testalls = [] | |
| for branch in sys.argv[2:]: | |
| # use last part of branch name as header value | |
| m = re.search(r'([^_-]+)$', branch) | |
| if m: headers.append(m.group(1)) | |
| else: headers.append(branch) | |
| branches.append("[branch|https://github.com/{}/cassandra/tree/{}]".format(username, branch)) | |
| dtests.append("[dtest|http://cassci.datastax.com/view/Dev/view/{0}/job/{0}-{1}-dtest/]".format(username, branch)) | |
| testalls.append("[testall|http://cassci.datastax.com/view/Dev/view/{0}/job/{0}-{1}-testall/]".format(username, branch)) | |
| print("||{}||".format("||".join(headers))) | |
| print("|{}|".format("|".join(branches))) | |
| print("|{}|".format("|".join(dtests))) | |
| print("|{}|".format("|".join(testalls))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment