https://github.com/drptbl/nightwatchman
A Jenkins-to-GoogleSheets report generator with a declarative style
https://github.com/drptbl/nightwatchman
Last synced: over 1 year ago
JSON representation
A Jenkins-to-GoogleSheets report generator with a declarative style
- Host: GitHub
- URL: https://github.com/drptbl/nightwatchman
- Owner: drptbl
- Created: 2016-06-17T10:48:15.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-06-01T03:07:55.000Z (about 10 years ago)
- Last Synced: 2025-02-27T05:13:32.333Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Nightwatchman
### About
A Jenkins-to-GoogleSheets report generator with a declarative style.
### Run
`python nightwatchman.py configurations...`
Must be run from nightwatchman root folder.
Configuration names must match file names in "configurations" folder.
The ".json" extension is optional.
### Install Libraries
`sudo pip install gspread`
`sudo pip install jenkinsapi`
### Setup
In the "credentials" folder, create "jenkins.json" from the template and populate it with a username and ldap password
Obtain the team's "google.json" credentials file or generate one yourself.
To generate one, follow the gspread instructions for creating a "service account key": http://gspread.readthedocs.org/en/latest/oauth2.html
Download that json file and save it as "google.json" in the "credentials" folder
### Configuration Files
Report configurations are in the JSON format.
They support the following entries. They are all Strings except where noted.
Config parameters:
drive_file = the Google spreadsheet to write to
sheet = the worksheet tab in the spreadsheet
columns (list) = the cells to write for each row (supports: jobname, buildno, status, duration, timestamp)
writer = the output writer (supports: spreadsheet, console)
base (dict) = every 'job' in the 'jobs' list will inherit these parameters
jobs (list of dicts) = the jobs to find. assumed to have kicked off other jobs. those jobs are printed as rows. View the job parameters below.
Job parameters:
job = the Jenkins job name
version = the most recent version or branch to find
bps (dict) = build parameters to filter by (ex. "bps": {"INSTALL_TYPE": "tar", "PROVIDER": "openstack"})
build (int) = will grab this build number and will ignore version and bps
### Sites
gspread
https://github.com/burnash/gspread
http://gspread.readthedocs.org/en/latest/index.html
jenkinsapi
https://github.com/salimfadhley/jenkinsapi
https://jenkinsapi.readthedocs.org/en/latest/build.html