-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move contribution guidelines into CONTRIBUTING page (#112)
* Move contribution guidelines into CONTRIBUTING page Minor improvements to phrasing in the plugin documentation. Include instructions for developers that want to use the plugin, modeled after the HTTP client API 4 instructions. * Remove unmaintained GitPod references
- Loading branch information
1 parent
77147ad
commit bfaa8a8
Showing
4 changed files
with
88 additions
and
50 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Contributing to the plugin | ||
|
||
Plugin source code is hosted on [GitHub](https://github.com/jenkinsci/docker-java-api-plugin). | ||
New feature proposals and bug fix proposals should be submitted as | ||
[GitHub pull requests](https://help.github.com/articles/creating-a-pull-request). | ||
Your pull request will be evaluated by the [Jenkins job](https://ci.jenkins.io/job/Plugins/job/docker-java-api-plugin/). | ||
|
||
Before submitting your change, please assure that you've added tests which verify your change. | ||
|
||
## Code formatting with spotless | ||
|
||
Source code and pom file formatting are maintained by the `spotless` maven plugin. | ||
Before submitting a pull request, please format with: | ||
|
||
* `mvn spotless:apply` | ||
|
||
## Static analysis with spotbugs | ||
|
||
Please don't introduce new spotbugs output. | ||
|
||
* `mvn spotbugs:check` to analyze project using [Spotbugs](https://spotbugs.github.io) | ||
* `mvn spotbugs:gui` to review report using GUI | ||
|
||
## Code Coverage | ||
|
||
[JaCoCo code coverage](https://www.jacoco.org/jacoco/) reporting is available as a maven target and is [reported](https://ci.jenkins.io/job/Plugins/job/docker-java-api-plugin/) by the [Jenkins warnings plugin](https://plugins.jenkins.io/warnings-ng/). | ||
Please try to improve code coverage with tests when you submit a pull request. | ||
|
||
* `mvn -P enable-jacoco clean install jacoco:report` to report code coverage with JaCoCo. | ||
|
||
### Reviewing Code Coverage | ||
|
||
The code coverage report is a set of HTML files that show methods and lines executed. | ||
The following commands will open the `index.html` file in the browser. | ||
|
||
* Windows - `start target\site\jacoco\index.html` | ||
* Linux - `xdg-open target/site/jacoco/index.html` | ||
|
||
The file will have a list of package names. | ||
Click on them to find a list of class names. | ||
|
||
The lines of the code will be covered in three different colors, red, green, and orange. | ||
Red lines are not covered in the tests. | ||
Green lines are covered with tests. | ||
|
||
## Maintaining automated tests | ||
|
||
Automated tests are run as part of the `verify` phase. | ||
Run automated tests in a development environment with the command: | ||
|
||
``` | ||
$ mvn clean verify | ||
``` | ||
|
||
## Report an Issue | ||
|
||
Use the ["Report an issue" page](https://www.jenkins.io/participate/report-issue/redirect/#23136) to submit bug reports. | ||
Please review [existing issues](https://issues.jenkins.io/issues/?jql=resolution%20is%20EMPTY%20and%20component%3D23136) before submitting a new issue. | ||
Please use the ["How to Report an Issue"](https://www.jenkins.io/participate/report-issue/) guidelines when reporting issues. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,35 @@ | ||
# Docker Java API Plugin | ||
|
||
This plugin exposes the [docker-java](http://github.com/docker-java/docker-java) API to Jenkins plugins. | ||
This plugin provides the [docker-java](http://github.com/docker-java/docker-java) API to Jenkins plugins. | ||
Plugins using docker-java should depend on this plugin and not directly on docker-java. | ||
|
||
Only the Apache HttpClient 5 transport is available; the Jersey transport does not work. | ||
|
||
# Environment | ||
|
||
The following build environment is required to build this plugin | ||
|
||
* Java 11 and Maven 3.8.1 | ||
|
||
# Build | ||
|
||
To build the plugin locally: | ||
|
||
mvn clean verify | ||
|
||
# Release | ||
|
||
To release the plugin: | ||
|
||
mvn release:prepare release:perform -B | ||
|
||
# Test local instance | ||
|
||
To test in a local Jenkins instance | ||
|
||
mvn hpi:run | ||
|
||
[wiki]: http://wiki.jenkins-ci.org/display/JENKINS/Docker+Java+API+Plugin | ||
## Using the API in your plugin | ||
|
||
Replace the dependency to `com.github.docker-java:docker-java` with a dependency to `org.jenkins-ci.plugins:docker-java-api`. | ||
Avoid version conflicts by using the [Jenkins plugin BOM](https://github.com/jenkinsci/bom#readme) rather than depending on a specific version. | ||
|
||
* Before: | ||
``` | ||
<dependencies> | ||
... | ||
<dependency> | ||
<groupId>com.github.docker-java</groupId> | ||
<artifactId>docker-java</artifactId> | ||
<version>3.4.1</version> | ||
</dependency> | ||
... | ||
</dependencies> | ||
``` | ||
* After: | ||
``` | ||
<dependencies> | ||
... | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>docker-java-api</artifactId> | ||
</dependency> | ||
... | ||
</dependencies> | ||
``` |