Skip to content

Commit 0b97b70

Browse files
authored
docs: move documentation to github pages (#717)
* docs: move documentation to github pages docsify * docs: add min jenkins badge * fix typo in README * update PR template
1 parent 6e262f6 commit 0b97b70

File tree

11 files changed

+200
-179
lines changed

11 files changed

+200
-179
lines changed

.github/pull_request_template.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
🚨 Please review the [guidelines for contributing](../blob/master/docs/CONTRIBUTING.md) to this repository.
2-
31
<!--
42
Put an `x` into the [ ] to show you have filled the information
53
-->
64

7-
### Related issues
5+
### Related issue
86

97
<!-- Paste links to the issues that are related/resolved by this PR -->
108
<!-- If this PR is related to upstream libraries/API changes, include those links as well -->
@@ -17,14 +15,9 @@ Put an `x` into the [ ] to show you have filled the information
1715

1816
<!-- Describe how did you test your changes. If you don't have a Jira Cloud instance to test on, ask the maintainer to grant access to https://jenkins-jira-plugin.atlassian.net/ -->
1917

18+
- [ ] I have updated/added relevant documentation in the `docs/` directory
19+
- [ ] I have verified that the Code Coverage is not lower than before / that all the changes are covered as needed
2020
- [ ] I have tested my changes with a Jira Cloud / Jira Server
2121

22-
<!-- provide the flavor (Jira Cloud / Jira Server) and the version -->
23-
24-
- [ ] I have verified that the Code Coverage is not lower than before / that all the changes are covered as needed
25-
26-
### Checklist
27-
28-
- [ ] Make sure you are requesting the pull request from a _custom branch_ and **not your master/main branch**
29-
- [ ] Ensure that the pull request title represents the desired changelog entry
30-
- [ ] Apply relevant PR labels, at least one of `feature` or `bugfix` or `documentation`
22+
<!-- provide here the flavor (Jira Cloud / Jira Server) and the version -->
23+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ work/
1212
*.code-workspace
1313

1414
# ignore all Idea files except for common codestyle settings
15+
.DS_Store
1516
*.iml
1617
.vscode/
1718
.idea/*

README.md

Lines changed: 7 additions & 151 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
# Jenkins Jira Plugin
22

3-
[![Documentation](https://img.shields.io/jenkins/plugin/v/jira.svg?label=Documentation)](https://plugins.jenkins.io/jira)
3+
[![Jenkins Version](https://img.shields.io/badge/Jenkins-2.479.3-green.svg?label=min.%20Jenkins)](https://jenkins.io/download/)
44
[![Jenkins Plugin Installs](https://img.shields.io/jenkins/plugin/i/jira.svg?color=blue)](https://stats.jenkins.io/pluginversions/jira.html)
55
[![GitHub release](https://img.shields.io/github/release/jenkinsci/jira-plugin.svg?label=Release)](https://github.com/jenkinsci/jira-plugin/releases/latest)
66
[![Jenkins CI](https://ci.jenkins.io/buildStatus/icon?job=Plugins/jira-plugin/master)](https://ci.jenkins.io/job/Plugins/job/jira-plugin/)
77
[![Contributors](https://img.shields.io/github/contributors/jenkinsci/jira-plugin.svg)](https://github.com/jenkinsci/jira-plugin/graphs/contributors)
88

9-
## About the plugin
10-
11-
This plugin integrates with Jenkins the [Atlassian Jira Software](http://www.atlassian.com/software/jira/) (both Cloud and Server versions). For bug reports, see [bugs](https://issues.jenkins-ci.org/issues/?filter=14761) or [all open issues](https://issues.jenkins-ci.org/issues/?filter=14956). For documentation, see [official plugin site](https://plugins.jenkins.io/jira).
9+
See plugin documentation at [https://jenkinsci.github.io/jira-plugin/](https://jenkinsci.github.io/jira-plugin/)
1210

1311
## i18n
1412

15-
This plugin is using [CrowdIn platform](https://jenkins.crowdin.com/jira-plugin) as the frontend to manage translations. If you would like to contribute translation of this plugin in your language, you're most than welcome! For details, see [jenkins.io CrowdIn introduction](https://www.jenkins.io/doc/developer/crowdin/translating-plugins/).
1613

1714
[![da translation](https://img.shields.io/badge/dynamic/json?color=blue&label=da&style=flat&logo=crowdin&query=%24.progress.0.data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-200016380-35.json)](https://jenkins.crowdin.com/jira-plugin)
1815
[![de translation](https://img.shields.io/badge/dynamic/json?color=blue&label=de&style=flat&logo=crowdin&query=%24.progress.1.data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-200016380-35.json)](https://jenkins.crowdin.com/jira-plugin)
@@ -23,153 +20,12 @@ This plugin is using [CrowdIn platform](https://jenkins.crowdin.com/jira-plugin)
2320
[![ja translation](https://img.shields.io/badge/dynamic/json?color=blue&label=ja&style=flat&logo=crowdin&query=%24.progress.6.data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-200016380-35.json)](https://jenkins.crowdin.com/jira-plugin)
2421
[![pl translation](https://img.shields.io/badge/dynamic/json?color=blue&label=pl&style=flat&logo=crowdin&query=%24.progress.7.data.translationProgress&url=https%3A%2F%2Fbadges.awesome-crowdin.com%2Fstats-200016380-35.json)](https://jenkins.crowdin.com/jira-plugin)
2522

26-
## Compatibility
27-
28-
For plugin compatibility with [Pipeline plugin](https://github.com/jenkinsci/pipeline-plugin), see [COMPATIBILITY](COMPATIBILITY.md).
29-
30-
## Configuring the plugin
31-
32-
### Configuration for Jira Cloud
33-
34-
With Atlassian Jira Cloud, it's not possible to create a user without an email, so you need to create API token that will be used as a _service user_ by Jenkins to execute API calls to Jira Cloud - follow [Atlassian API tokens documentation](https://confluence.atlassian.com/cloud/api-tokens-938839638.html)
35-
36-
Then create a global Jenkins credential:
37-
38-
- put _Atlassian ID email_ as username
39-
- _API token_ as password.
40-
41-
You can check if your API token works correctly by getting a correct JSON issue response with this command (where TEST-1 is an example issue in your project):
42-
43-
```bash
44-
curl -X GET -u <email>:<API token> -H "Content-Type: application/json" https://<YourCloudInstanceName>.atlassian.net/rest/api/latest/issue/TEST-1
45-
```
46-
47-
Also make sure that CAPTCHA is not triggered for your user as this will
48-
prevent the API token to work - see [CAPTCHA section in Atlassian REST API documentation.](https://developer.atlassian.com/cloud/jira/platform/jira-rest-api-basic-authentication/)
49-
50-
### System properties
51-
52-
- _-Dhudson.plugins.jira.JiraMailAddressResolver.disabled=true_
53-
54-
Use to disable resolving user email from Jira usernames. Currently there is no option for this in UI.
55-
56-
### Using Jira REST API
57-
58-
This plugin has an optional feature to update Jira issues with a back pointer to Jenkins build pages. This allows the submitter and watchers to quickly find out which build they need to pick up to get the fix.
59-
60-
![plugin-configuration](docs/images/Plugin_Configuration.png)
61-
62-
### Jira Issue links in build Changelog
63-
64-
When you configure your Jira site in Jenkins, the plugin will automatically hyperlink all matching issue names to Jira.
65-
66-
If you have additionally provided username/password to Jira, the hyperlinks will also contain tooltips with the issue summary.
67-
68-
![example-annotated-changelog](docs/images/example_annotated_changelog.png)
69-
70-
### Updating Jira issues with back pointers
71-
72-
If you also want to use this feature, you need to supply a valid user id/password. If you need the comment only to be visible to a certain Jira group, e.g. _Software Development_, enter the groupname.
73-
74-
Now you also need to configure jobs. I figured you might not always have write access to the Jira (say you have a Jenkins build for one of the Apache commons project that you depend on), so that's why this is optional.
75-
76-
The following screen shows how a Jira issue is updated:
77-
78-
![jira-comments](docs/images/Jira_Comments.jpg)
79-
80-
By taking advantages of Jenkins' [fingerprint](https://wiki.jenkins.io/display/JENKINS/Fingerprint) feature, when your other projects that depend on this project pick up a build with a fix, those build numbers can also be recorded in Jira.
81-
82-
This is quite handy when a bug is fixed in one of the libraries, yet the submitter wants a fix in a different project. This happens often in my work, where a bug is reported against JAX-WS but the fix is in JAXB.
83-
84-
For curious mind, see [this thread for how this works behind the scene](http://jenkins.361315.n4.nabble.com/How-can-does-Hudson-Jira-integration-works-td374680.html).
85-
86-
### Referencing Jira Release version
87-
88-
To reference Jira Release versions in your build, you can pull these
89-
releases directly from Jira by adding the Jira Release Version
90-
Parameter.
23+
This plugin uses [CrowdIn platform](https://jenkins.crowdin.com/jira-plugin) as the frontend to manage translations. If you would like to contribute translation of this plugin in your language, you're most welcome! For details, see [jenkins.io CrowdIn introduction](https://www.jenkins.io/doc/developer/crowdin/translating-plugins/).
9124

92-
This can be useful for generating release notes, trigerring
93-
parameterized build, etc.
94-
![version-parameters](docs/images/version_parameters.png)
95-
96-
### Generating Release Notes
97-
98-
You can also generate release notes to be used during your build. These notes can be retrieved from an environment variable. See the [Maven Project Plugin](https://wiki.jenkins.io/display/JENKINS/Maven+Project+Plugin) for
99-
the environment variables found within the POM.
100-
![release-notes](docs/images/release_notes.png)
101-
102-
After your build has run, you can also have the plugin mark a release as resolved. This typically will be a release you specified in your Build Parameters.
103-
![marking-as-resolved](docs/images/mark_as_resolved.png)
104-
105-
The plugin can also move certain issues matching a JQL query to a new release version.
106-
![moving-issues](docs/images/move_issues.png)
107-
108-
Sample usage of generated Release Notes:
109-
![release-notes-config](docs/images/release_notes_config.png)
110-
111-
### Jira Authentication & Permissions required
112-
113-
**Note:** As a rule of thumb, **you should be always using a service account** (instead of a personal account) to integrate Jenkins with Jira.
114-
115-
Make sure that the Jira user used by Jenkins has enough permissions to execute its actions. You can do that via Jira Permission Helper tool.
116-
117-
- For creating Jira issues, the user has to be able to Create Issues in the specified project
118-
- If you additionally enter assignee or component field values, make sure that:
119-
- both of the fields are assigned to the corresponding Jira Screen
120-
- the Jira user is Assignable in the project
121-
- the Jenkins Jira user can Assign issues
122-
123-
### Related Resources
124-
125-
- Check also the Marvelution [Jenkins Integration for Jira](https://www.marvelution.com/products/jenkins-integration-for-jira/) which provides a two-way solution (Jenkins-\>Jira and Jira-\>Jenkins)
126-
- For Jira Workflow (Pipeline) plugin compatibility see [COMPATIBILITY.md](COMPATIBILITY.md)
127-
128-
#### Common issues
129-
130-
##### Jenkins<>Jira SSL connectivity problems
131-
132-
If you encounter stacktrace like this:
133-
134-
```stacktrace
135-
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
136-
```
137-
138-
make sure the JRE/JDK that Jenkins master is running (or the Jenkins slaves are running) contain the valid CA chain certificates that Jira is running with.
139-
You can test it using this [SSLPoke.java class](https://gist.github.com/warden/e4ef13ea60f24d458405613be4ddbc51):
140-
141-
```sh
142-
$ wget -O SSLPoke.java https://gist.githubusercontent.com/warden/e4ef13ea60f24d458405613be4ddbc51/raw/7f258a30be4ddea7b67239b40ae305f6a2e98e0a/SSLPoke.java
143-
144-
$ /usr/java/jdk1.8.0_131/bin/javac SSLPoke.java
145-
146-
$ /usr/java/jdk1.8.0_131/jre/bin/java SSLPoke jira.domain.com 443
147-
Successfully connected
148-
```
149-
150-
References:
151-
152-
- [Jenkins fails with PKIX Path building error](https://stackoverflow.com/questions/52842214/jenkins-fails-with-pkix-path-building-error)
153-
- [PKIX path building failed error message
154-
](https://support.cloudbees.com/hc/en-us/articles/217078498-PKIX-path-building-failed-error-message)
155-
156-
## Something doesn't work?
157-
158-
Contribute or Sponsor!
159-
160-
We all love Open Source, but... Open Source Software relies on contributions of fellow developers. Please contribute by [opening Pull Requests](#contributing) or if you are not a developer, consider sponsoring one of the maintainers.
161-
162-
### Contributing
163-
164-
New feature proposals and bug fix proposals should be submitted as [Pull Requests](https://help.github.com/articles/creating-a-pull-request). When adding new features please make sure that they support Jenkins Pipeline Plugin - see [COMPATIBILITY.md](https://github.com/jenkinsci/pipeline-plugin/blob/master/COMPATIBILITY.md) for more information
165-
166-
### Tests
25+
## Contributing
16726

16827
There have been many developers involved in the development of this plugin and there are many downstream users who depend on it. Tests help us assure that we're delivering a reliable plugin and that we've communicated our intent to other developers in a way that they can detect when they run tests.
16928

170-
- each change should be covered by appropriate unit tests.
171-
- in case it is not testable via a unit test, it should be tested against a real Jira instance - possibly both Jira Server and Jira Cloud. There is a [Jira Cloud test instance](https://jenkins-jira-plugin.atlassian.net/) that we are using for testing the plugin releases - let us know in the Pull Request in case you need access for testing.
172-
173-
## Maintainers
174-
175-
See [MAINTAINERS](MAINTAINERS.md) for some useful info.
29+
- each change should be covered by appropriate unit tests
30+
- in case it is not testable via a unit test, it should be tested against a real Jira instance - possibly both Jira Server and Jira Cloud. There is a [Jira Cloud test instance](https://jenkins-jira-plugin.atlassian.net/) that we are using for testing the plugin releases - let us know in the Pull Request in case you need access for testing
31+

docs/.nojekyll

Whitespace-only changes.

docs/README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Jenkins Jira plugin
2+
3+
This plugin integrates with Jenkins the [Atlassian Jira Software](http://www.atlassian.com/software/jira/) (both Cloud and Server versions).
4+
5+
## Configuration
6+
7+
!> **Jira Cloud** does not support Bearer Authentication
8+
9+
To integrate Jenkins with Atlassian Jira Cloud, you need to use an API token as a _service user_. Jira Cloud requires an email address for all users, so you cannot create a user without one.
10+
11+
### Steps
12+
13+
1. **Create an API Token**
14+
15+
Follow the [Atlassian API tokens documentation](https://confluence.atlassian.com/cloud/api-tokens-938839638.html) to generate a new API token.
16+
17+
2. **Add a Global Jenkins Credential**
18+
19+
- **Username:** Your Atlassian ID email address
20+
- **Password:** The API token you created
21+
22+
3. **Test Your API Token**
23+
24+
Verify your API token by running the following command (replace `<email>`, `<API token>`, `<YourCloudInstanceName>`, and `TEST-1` with your details):
25+
26+
```bash
27+
curl -X GET -u <email>:<API token> -H "Content-Type: application/json" \
28+
https://<YourCloudInstanceName>.atlassian.net/rest/api/latest/issue/TEST-1
29+
```
30+
31+
A successful response returns the issue details in JSON format.
32+
33+
4. **Check for CAPTCHA**
34+
35+
Ensure that CAPTCHA is **not** triggered for your user, as this will prevent the API token from working. For more information, see the [CAPTCHA section in Atlassian REST API documentation](https://developer.atlassian.com/cloud/jira/platform/jira-rest-api-basic-authentication/).
36+
37+
5. **Test Connection**
38+
39+
Finally, use the **Validate Settings** button on the plugin configuration page, to see if it can connect to the Jira instance.
40+
41+
![plugin-configuration](images/Plugin_Configuration.png)
42+
43+
44+
## Something doesn't work?
45+
46+
First, check [Github Issues](https://github.com/jenkinsci/jira-plugin/issues) for already reported bugs.
47+
48+
Then, Contribute or Sponsor!
49+
50+
We all love Open Source, but... Open Source Software relies on contributions of fellow developers. Please contribute by [opening Pull Requests](#contributing) or if you are not a developer, consider sponsoring one of the maintainers - see ["Sponsor this project" section.](https://github.com/jenkinsci/jira-plugin)

docs/_sidebar.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
* [Home](/)
2+
* [Features](features.md)
3+
* [System Properties](system-properties.md)
4+
* [Usage Examples](usage-examples.md)
5+
* [Troubleshooting](troubleshooting.md)
6+

docs/features.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Jenkins Jira plugin features
2+
3+
### Using Jira REST API
4+
5+
This plugin has an optional feature to update Jira issues with a back pointer to Jenkins build pages. This allows the submitter and watchers to quickly find out which build they need to pick up to get the fix.
6+
7+
![plugin-configuration](images/Plugin_Configuration.png)
8+
9+
### Jira Issue links in build Changelog
10+
11+
When you configure your Jira site in Jenkins, the plugin will automatically hyperlink all matching issue names to Jira.
12+
13+
If you have additionally provided username/password to Jira, the hyperlinks will also contain tooltips with the issue summary.
14+
15+
![example-annotated-changelog](images/example_annotated_changelog.png)
16+
17+
### Updating Jira issues with back pointers
18+
19+
If you also want to use this feature, you need to supply a valid user id/password. If you need the comment only to be visible to a certain Jira group, e.g. _Software Development_, enter the groupname.
20+
21+
Now you also need to configure jobs. I figured you might not always have write access to the Jira (say you have a Jenkins build for one of the Apache commons project that you depend on), so that's why this is optional.
22+
23+
The following screen shows how a Jira issue is updated:
24+
25+
![jira-comments](images/Jira_Comments.jpg)
26+
27+
By taking advantages of Jenkins' [fingerprint](https://wiki.jenkins.io/display/JENKINS/Fingerprint) feature, when your other projects that depend on this project pick up a build with a fix, those build numbers can also be recorded in Jira.
28+
29+
This is quite handy when a bug is fixed in one of the libraries, yet the submitter wants a fix in a different project. This happens often in my work, where a bug is reported against JAX-WS but the fix is in JAXB.
30+
31+
For curious mind, see [this thread for how this works behind the scene](http://jenkins.361315.n4.nabble.com/How-can-does-Hudson-Jira-integration-works-td374680.html).
32+
33+
### Referencing Jira Release version
34+
35+
To reference Jira Release versions in your build, you can pull these
36+
releases directly from Jira by adding the Jira Release Version
37+
Parameter.
38+
39+
This can be useful for generating release notes, trigerring
40+
parameterized build, etc.
41+
![version-parameters](images/version_parameters.png)
42+
43+
### Generating Release Notes
44+
45+
You can also generate release notes to be used during your build. These notes can be retrieved from an environment variable. See the [Maven Project Plugin](https://wiki.jenkins.io/display/JENKINS/Maven+Project+Plugin) for
46+
the environment variables found within the POM.
47+
![release-notes](images/release_notes.png)
48+
49+
After your build has run, you can also have the plugin mark a release as resolved. This typically will be a release you specified in your Build Parameters.
50+
![marking-as-resolved](images/mark_as_resolved.png)
51+
52+
The plugin can also move certain issues matching a JQL query to a new release version.
53+
![moving-issues](images/move_issues.png)
54+
55+
Sample usage of generated Release Notes:
56+
![release-notes-config](images/release_notes_config.png)
57+
58+
### Jira Authentication & Permissions required
59+
60+
**Note:** As a rule of thumb, **you should be always using a service account** (instead of a personal account) to integrate Jenkins with Jira.
61+
62+
Make sure that the Jira user used by Jenkins has enough permissions to execute its actions. You can do that via Jira Permission Helper tool.
63+
64+
- For creating Jira issues, the user has to be able to Create Issues in the specified project
65+
- If you additionally enter assignee or component field values, make sure that:
66+
- both of the fields are assigned to the corresponding Jira Screen
67+
- the Jira user is Assignable in the project
68+
- the Jenkins Jira user can Assign issues

0 commit comments

Comments
 (0)