https://github.com/andriykohut/builddiff
Diff/list console output of Jenkins builds
https://github.com/andriykohut/builddiff
Last synced: 4 months ago
JSON representation
Diff/list console output of Jenkins builds
- Host: GitHub
- URL: https://github.com/andriykohut/builddiff
- Owner: andriykohut
- Created: 2015-08-18T14:29:38.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-29T10:40:02.000Z (over 9 years ago)
- Last Synced: 2024-12-27T14:41:03.287Z (5 months ago)
- Language: Python
- Homepage:
- Size: 18.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# builddiff
[](https://travis-ci.org/andriykohut/builddiff)Compare console output of Jenkins builds
## Usage
Console output example:
```
...
62) some-test-file.js Some test case:
TypeError: Object mouse has no method 'tail'
63) some-test-file.js Another test case:
TypeError: Object mouse has no method 'tail'
63) another-test-file.js Yet Another test case:
TypeError: Object mouse has no method 'tail'
...
```
Let's try:
```bash
bd -r "^\s+\d+\)\s(?P[\w|\-]+\.js)\s(?P.+):$" -f "I|M" list 589
bd -r "^\s+\d+\)\s(?P[\w|\-]+\.js)\s(?P.+):$" -f "I|M" diff 589 590 --color
bd list 16475 16476 16477 16478 16479 16480 16481 16482
```
The last one lists failures for multiple builds and uses default regex and flagsHere how it works:
```
usage: bd [-h] [-c CONFIG] [-f FLAGS] [-r RE] [-k KEY_GROUP] [-v VALUES_GROUP]
{diff,list} ...positional arguments:
{diff,list} commandsoptional arguments:
-h, --help show this help message and exit
-c CONFIG, --config CONFIG
A path to configuration file [Default: ~/.bdiff]
-f FLAGS, --flags FLAGS
Python regex flags, eg: "I" or "I|M" [Default: I|M]
-r RE, --re RE Regex for parsing console output. [Default:
^\s+\d+\)\s(?P[\w|\-]+\.js)\s(?P.+):$]
-k KEY_GROUP, --key KEY_GROUP
key group name [Default: key]
-v VALUES_GROUP, --values VALUES_GROUP
values group name [Default: values]
```
## Installation
```
virtualenv myenv
source myenv/bin/activate
pip install git+git://github.com/andriykohut/builddiffbd -h
```
## Config
You will be prompted for configuration first time you run `bd`.
Here's how config looks like:
```yaml
cat ~/.bdiff
jenkins:
url:
job:
user:
password:
```
## Authors`builddiff` was written by [Andriy Kogut](mailto:[email protected]).