third-party-ci-tools/monitoring/lastcomment-scoreboard
Lenny Verkhovsky 00f6bdd358 Fixed quering new Gerrit
Extend rest query with additional options to get 'name' that was removed
with commit https://gerrit-review.googlesource.com/#/c/39767/

Removed 'exit' on invalid gerrit reviewer name.

Change-Id: If48d5655202ca1e36c33ac6067e86b2db84360f2
2016-01-14 15:59:56 +02:00
..
.gitignore Add lastcomment 2015-07-22 20:52:19 -07:00
LICENSE Add lastcomment 2015-07-22 20:52:19 -07:00
README.rst Add lastcomment 2015-07-22 20:52:19 -07:00
ci.yaml Add lastcomment 2015-07-22 20:52:19 -07:00
lastcomment.py Fixed quering new Gerrit 2016-01-14 15:59:56 +02:00
report.html Add lastcomment 2015-07-22 20:52:19 -07:00
requirements.txt Add lastcomment 2015-07-22 20:52:19 -07: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

README.rst

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