https://github.com/cburgmer/build-facts
Dump your build pipeline's data for inspection
https://github.com/cburgmer/build-facts
ci concourse continuous-delivery continuous-integration gocd jenkins metrics teamcity
Last synced: about 1 month ago
JSON representation
Dump your build pipeline's data for inspection
- Host: GitHub
- URL: https://github.com/cburgmer/build-facts
- Owner: cburgmer
- License: bsd-2-clause
- Created: 2019-08-06T20:25:44.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-04-25T18:58:08.000Z (about 3 years ago)
- Last Synced: 2025-04-12T15:12:12.014Z (about 1 month ago)
- Topics: ci, concourse, continuous-delivery, continuous-integration, gocd, jenkins, metrics, teamcity
- Language: Clojure
- Homepage:
- Size: 3.91 MB
- Stars: 15
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Build facts
Download build facts from different CI/CD servers in a standard JSON schema.
You then take it from there with your own analytics.$ curl -LO https://github.com/cburgmer/build-facts/releases/download/0.6.1/build-facts-0.6.1-standalone.jar
$ java -jar build-facts-0.6.1-standalone.jar jenkins http://localhost:8080
Finding all builds for syncing from http://localhost:8080 (starting from 2021-01-06T23:00:00.000Z)...
{"jobName":"Test","buildId":"1","start":1615151319678,"end":1615151342243,"outcome":"pass","inputs":[{"revision":"9bb731de4f4372a8c3b4e53e7d70cd729b32419c","sourceId":"https://github.com/cburgmer/buildviz.git"}]}
{"jobName":"Test","buildId":"2","start":1615151342348,"end":1615151344854,"outcome":"pass","inputs":[{"revision":"9bb731de4f4372a8c3b4e53e7d70cd729b32419c","sourceId":"https://github.com/cburgmer/buildviz.git"}]}
{"jobName":"Deploy","buildId":"1","start":1615151349657,"end":1615151361672,"outcome":"pass","inputs":[{"revision":"9bb731de4f4372a8c3b4e53e7d70cd729b32419c","sourceId":"TEST_GIT_COMMIT"}],"triggeredBy":[{"jobName":"Test","buildId":"1"},{"jobName":"Test","buildId":"2"}]}
[...]## Why?
It's hard to innovate when every build server has their own format of reporting
build data. By offering a more standard format, we hope that it becomes
feasible to share build analytics across users of different build servers.
See https://github.com/cburgmer/buildviz for an example on what is possible with
the current set of build properties.## Features
- Streams standardized build data (specified via JSON Schema)
- Splunk HEC format
- Resume from previous sync
- Output build data to files### Supported build servers
| Build server | Start, end and outcome | Inputs | Triggered by | Test results | Tasks |
| ------------ | ---------------------- | ------ | ------------ | ------------ | ----- |
| Concourse | ✓ | ✓ | ✓ | | ✓ |
| GoCD | ✓ | ✓ | ✓ | ✓ | |
| Jenkins | ✓ | ✓ | ✓ | ✓ | |
| TeamCity | ✓ | ✓ | ✓ | ✓ | |See [BUILD_SERVERS.md](./BUILD_SERVERS.md) for detailed setup.
## JSON schema
[JSON Schema document](./resources/schema.json)
Example:
{
"jobName": "Deploy",
"buildId": "21",
"start": 1451449853542,
"end": 1451449870555,
"outcome": "pass", /* or "fail" */
"inputs": [{
"revision": "1eadcdd4d35f9a",
"sourceId": "[email protected]:cburgmer/buildviz.git"
}],
"triggeredBy": [{
"jobName": "Test",
"buildId": "42"
}],
"testResults": [{
"name": "Test Suite",
"children": [{
"classname": "some.class",
"name": "A Test",
"runtime": 2,
"status": "pass"
}]
}],
"tasks":[{
"name": "deploy-artifact",
"start": 1451449853600,
"end": 1451449870500,
"worker":"worker-fb7cf6b7ac4f"
}]
}## Examples
This project ships with examples for every supported build server: [./examples](./examples/).