Skip to content

Commit 07df998

Browse files
committed
Update docs
1 parent 9348b55 commit 07df998

File tree

4 files changed

+55
-10
lines changed

4 files changed

+55
-10
lines changed

README.md

Lines changed: 54 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,64 @@
1-
# junit-postgresql
1+
# Junit SQL Storage Plugin
22

3-
[![Build Status](https://ci.jenkins.io/job/Plugins/job/junit-postgresql-plugin/job/master/badge/icon)](https://ci.jenkins.io/job/Plugins/job/junit-postgresql-plugin/job/master/)
4-
[![Contributors](https://img.shields.io/github/contributors/jenkinsci/junit-postgresql-plugin.svg)](https://github.com/jenkinsci/junit-postgresql-plugin/graphs/contributors)
5-
[![Jenkins Plugin](https://img.shields.io/jenkins/plugin/v/junit-postgresql.svg)](https://plugins.jenkins.io/junit-postgresql)
6-
[![GitHub release](https://img.shields.io/github/release/jenkinsci/junit-postgresql-plugin.svg?label=changelog)](https://github.com/jenkinsci/junit-postgresql-plugin/releases/latest)
7-
[![Jenkins Plugin Installs](https://img.shields.io/jenkins/plugin/i/junit-postgresql.svg?color=blue)](https://plugins.jenkins.io/junit-postgresql)
3+
[![Build Status](https://ci.jenkins.io/job/Plugins/job/junit-sql-storage-plugin/job/master/badge/icon)](https://ci.jenkins.io/job/Plugins/job/junit-sql-storage-plugin/job/master/)
4+
[![Contributors](https://img.shields.io/github/contributors/jenkinsci/junit-sql-storage-plugin.svg)](https://github.com/jenkinsci/junit-sql-storage-plugin/graphs/contributors)
5+
[![Jenkins Plugin](https://img.shields.io/jenkins/plugin/v/junit-sql-storage.svg)](https://plugins.jenkins.io/junit-sql-storage)
6+
[![GitHub release](https://img.shields.io/github/release/jenkinsci/junit-sql-storage-plugin.svg?label=changelog)](https://github.com/jenkinsci/junit-sql-storage-plugin/releases/latest)
7+
[![Jenkins Plugin Installs](https://img.shields.io/jenkins/plugin/i/junit-sql-storage.svg?color=blue)](https://plugins.jenkins.io/junit-sql-storage)
88

99
## Introduction
1010

11-
TODO Describe what your plugin does here
11+
Implements the pluggable storage API for the [Junit plugin](https://plugins.jenkins.io/junit/).
12+
13+
In common CI/CD use-cases a lot of the space is consumed by test reports.
14+
This data is stored within JENKINS_HOME, and the current storage format requires huge overheads when retrieving statistics and, especially trends.
15+
In order to display trends, each report has to be loaded and then processed in-memory.
16+
17+
The main purpose of externalising Test Results is to optimize Jenkins logic by querying the desired data from specialized external storage.
18+
19+
This plugin adds a SQL extension, any database should work although we're only currently testing against PostgreSQL.
20+
21+
Tables will be automatically created.
1222

1323
## Getting started
1424

15-
TODO Tell users how to configure your plugin here, include screenshots, pipeline examples and
16-
configuration-as-code examples.
25+
Install your database vendor specific plugin, you can use the Jenkins plugin manager to search for it:
26+
27+
`${JENKINS_URL}/pluginManager/available?filter=Database`
28+
29+
e.g. you could install the [PostgreSQL Database](https://plugins.jenkins.io/database-postgresql/) plugin.
30+
31+
### UI
32+
33+
Manage Jenkins => Configure System => Junit
34+
35+
In the dropdown select 'SQL Database'
36+
37+
![Junit SQL plugin configuration](images/junit-sql-config-screen.png)
38+
39+
Manage Jenkins => Configure System => Global Database
40+
41+
Select the database implementation you want to use and click 'Test Connection' to verify Jenkins can connect
42+
43+
![Junit SQL plugin database configuration](images/junit-sql-database-config.png)
44+
45+
Click 'Save'
46+
47+
### Configuration as code
48+
49+
```yaml
50+
unclassified:
51+
globalDatabaseConfiguration:
52+
database:
53+
postgreSQL:
54+
database: "jenkins"
55+
hostname: "${DB_HOST_NAME}"
56+
password: "${DB_PASSWORD}"
57+
username: "${DB_USERNAME}"
58+
validationQuery: "SELECT 1"
59+
junitTestResultStorage:
60+
storage: "database"
61+
```
1762
1863
## Contributing
1964

images/junit-sql-config-screen.png

8.97 KB
Loading
27 KB
Loading

src/main/resources/index.jelly

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?jelly escape-by-default='true'?>
22
<div>
3-
Provides a pluggable storage extension for the junit plugin with a SQL database
3+
Provides a pluggable storage extension for the junit plugin with a SQL database.
44
</div>

0 commit comments

Comments
 (0)