third-party-ci-tools/monitoring/lastcomment-scoreboard
John Griffith 89c077ae49 Fix up help message in cireporter.py
Minor fix to the help message to indicate count
(it was just a copy paste of Name).

Also added an example to the -p argument to show
that the openstack domain is needed when specifying
a project.

Lastly, either capitilize the first work in the help
string or don't, but be consistent.  More were LC so
I made the rest match.

Change-Id: I89e88e51459583c2564b033f7f45223eae77f2c1
2017-03-07 11:38:29 -07:00
..
.gitignore Add lastcomment 2015-07-22 20:52:19 -07:00
ci.yaml Adds the new cireporter script used by Cinder team 2017-02-07 21:00:01 +00:00
cinder_ci.py Added cinder_ci script 2017-02-10 21:31:47 +00:00
cireporter.py Fix up help message in cireporter.py 2017-03-07 11:38:29 -07:00
comment.py Added cinder_ci script 2017-02-10 21:31:47 +00:00
lastcomment.py Adds the new cireporter script used by Cinder team 2017-02-07 21:00:01 +00:00
LICENSE Add lastcomment 2015-07-22 20:52:19 -07:00
README.rst Adds the new cireporter script used by Cinder team 2017-02-07 21:00:01 +00:00
report.html Add lastcomment 2015-07-22 20:52:19 -07:00
requirements.txt Added requirements.txt 2017-02-13 19:18:43 +00:00
tox.ini Add lastcomment 2015-07-22 20:52:19 -07:00
user-data.txt Add lastcomment 2015-07-22 20:52:19 -07:00

Last Comment

Last Comment is a small script to query OpenStack's gerrit REST API and produce a report about the status of CI systems.

This can also be used as a CLI tool and used against any type of user (human or bot).

Design

The html based report is a data file plus a static page.

lastcomment is powered by gerrit's REST API and doesn't use any datastore. Although this means it cannot show results in real time, the data can be refreshed as frequent as desired.

Dependencies

requests

Help

./lastcomment.py -h

Generate a Report

To generate a html report for third party CI accounts on http://localhost:8000/report:

./lastcomment.py -f ci.yaml -c 100 --json lastcomment.json python -m SimpleHTTPServer

Cloud-init

To run this on a cloud server using cloud-init and cron use the user-data.txt file.

Other Uses

To see the last time the user 'Third Party CI' commented anywhere

./lastcomment.py -n 'Third Party CI'

To print the last 30 comments by 'Third Party CI' on the repo openstack/cinder

./lastcomment.py -n 'Third Party CI' -m -p openstack/cinder

To print the last 30 votes by 'Third Party CI' on the repo openstack/cinder

./lastcomment.py -n 'Third Party CI' -v -p openstack/cinder

To print the contents of the last 30 reviews by 'John Smith'

./lastcomment.py -n 'John Smith' -m

To specify a yaml file names.yaml containing projects and names to iterate through

./lastcomment.py -f names.yaml

To print statistics on third party CI accounts:

./lastcomment.py -c 100 -f ci.yaml -v

To generate a html report for cinder's third party CI accounts on http://localhost:8000/report:

./lastcomment.py -f ci.yaml -c 100 --json lastcomment.json python -m SimpleHTTPServer

CI Reporter

Script that produces statistics and a report of CI systems and their jobs. It can output in plain text or json to stdout or a file.

Help

./cireporter.py -h

Generate A Report

To generate a plain text report that includes stats for all Cinder CI's

./cireporter.py -i cinder.yaml -c 250

Other Uses

To see the latest Cinder Jenkins stats

./cireporter.py -p openstack/cinder -n Jenkins -c 250

To generate a report as json output to stdout

./cireporter.py -p openstack/cinder -n Jenkins -c 250 -j

To generate a report as json and write it to a file

./cireporter.py -p openstack/cinder -n Jenkins -c 250 -j -o foo.json