Skip to content

Commit a804f20

Browse files
Greatly improved the README
1 parent e004920 commit a804f20

1 file changed

Lines changed: 76 additions & 35 deletions

File tree

README.md

Lines changed: 76 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,115 @@
1+
# rocketchat-jira-trigger
2+
3+
Outgoing webhook integration for [Rocket.Chat](https://rocket.chat) that summarizes any [JIRA](https://www.atlassian.com/software/jira) issues mentioned
4+
15
[![Build Status](https://travis-ci.org/gustavkarlsson/rocketchat-jira-trigger.svg?branch=master)](https://travis-ci.org/gustavkarlsson/rocketchat-jira-trigger)
26
[![codecov](https://codecov.io/gh/gustavkarlsson/rocketchat-jira-trigger/branch/master/graph/badge.svg)](https://codecov.io/gh/gustavkarlsson/rocketchat-jira-trigger)
37
[![Docker Automated build](https://img.shields.io/docker/automated/gustavkarlsson/rocketchat-jira-trigger.svg)](https://hub.docker.com/r/gustavkarlsson/rocketchat-jira-trigger)
48
[![Image Layers](https://images.microbadger.com/badges/image/gustavkarlsson/rocketchat-jira-trigger.svg)](https://microbadger.com/images/gustavkarlsson/rocketchat-jira-trigger)
59
[![Image version](https://images.microbadger.com/badges/version/gustavkarlsson/rocketchat-jira-trigger.svg)](https://microbadger.com/images/gustavkarlsson/rocketchat-jira-trigger)
610
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/gustavkarlsson/rocketchat-jira-trigger/blob/master/LICENSE)
711

8-
# rocketchat-jira-trigger
9-
Outgoing webhook integration for Rocket.Chat that summarizes any JIRA issues mentioned
12+
## Running
1013

11-
## Building
12-
Clone the repository and run:
14+
You can run rocketchat-jira-trigger either natively (requires at [JDK 8](http://www.oracle.com/technetwork/java/javase/downloads/index.html) to build and [JRE 8](http://www.oracle.com/technetwork/java/javase/downloads/index.html) to run) or with [Docker](https://www.docker.com).
1315

14-
**Linux/OS X**
15-
```
16+
### Natively
17+
18+
First download the [source code](https://github.com/gustavkarlsson/rocketchat-jira-trigger/releases) and run:
19+
20+
#### Build on Linux/OS X
21+
22+
```shell
1623
./gradlew installDist
1724
```
18-
**Windows**
19-
```
25+
26+
#### Build on Windows
27+
28+
```shell
2029
gradlew.bat installDist
2130
```
22-
The binaries will be located in `build/install`
31+
32+
The app will be located in `build/install`. Now run the start script with a configuration file (if you have one) as the only argument:
33+
34+
#### Run on Linux/OS X
35+
36+
```shell
37+
bin/rocketchat-jira-trigger config.toml
38+
```
39+
40+
#### Run on Windows
41+
42+
```shell
43+
bin\rocketchat-jira-trigger.bat config.toml
44+
```
45+
46+
### With Docker
47+
48+
Use the Docker cli to mount a config file (if you have one) as volume `/app/config.toml` and set up port mapping for port `4567`:
49+
50+
```shell
51+
docker run -v $(pwd)/config.toml:/app/config.toml -p 4567:4567 --rm -it gustavkarlsson/rocketchat-jira-trigger:latest
52+
```
2353

2454
## Configuration
25-
To get started you only need to configure the URI of your JIRA server and some user credentials (unless anonymous access is allowed).
55+
56+
To get started you only need to configure the URI of your JIRA server and some user credentials (unless anonymous access is allowed). There are two ways to configure the application:
57+
58+
### Config file
59+
2660
Create a configuration file with the `.toml` extension and set it up like this:
27-
```
61+
62+
```toml
2863
[jira]
2964
uri = "https://jira.mycompany.com"
3065
username = "someuser"
3166
password = "somepassword"
3267
```
33-
If you don't want to save your password in plain text, then leave it out and you will be prompted to enter it when running the app.
34-
For further configuration settings, check out the [defaults](https://github.com/gustavkarlsson/rocketchat-jira-trigger/blob/master/src/main/resources/defaults.toml).
3568

36-
## Running
69+
### Environment variables
3770

38-
### With a start script
39-
Run the start scripts with a configuration file as the only argument:
71+
Set environment variables for the configuration options according to the following pattern: `<section>_<key>=<value>`. Compare this example with the above config file example to see the similarity:
4072

41-
**Linux/OS X**
42-
```
43-
bin/rocketchat-jira-trigger config.toml
44-
```
45-
**Windows**
46-
```
47-
bin\rocketchat-jira-trigger.bat config.toml
73+
```shell
74+
jira_uri=https://jira.mycompany.com
75+
jira_username=someuser
76+
jira_password=somepassword
4877
```
4978

50-
### With Docker
51-
Use the `docker` cli and mount a config file as volume `/app/config.toml` and set up port mapping for port `4567`:
52-
```
53-
docker run -v $(pwd)/config.toml:/app/config.toml -p 4567:4567 --rm -it gustavkarlsson/rocketchat-jira-trigger:latest
79+
For lists of values, use a comma as a separator:
80+
81+
```shell
82+
message_default_fields=assignee,status,reporter,priority
5483
```
5584

56-
## Trying it out
57-
In Rocket.Chat, set up an outgoing webhook pointing at the server on port 4567. Example: `http://server.mycompany.com:4567/`
85+
### Reference
86+
87+
For a list of all configuration settings, check out the [defaults](https://github.com/gustavkarlsson/rocketchat-jira-trigger/blob/master/src/main/resources/defaults.toml).
88+
89+
### Passwords
90+
91+
If you don't want to store your password in a file or environment variable, then leave it out and you will be prompted to enter it when running the app.
92+
93+
## Usage
94+
95+
In Rocket.Chat, set up an outgoing webhook pointing at the server on port `4567`. Example: `http://server.mycompany.com:4567/`
5896
and write a message containing a known JIRA issue to try it out. Example: `Let's check out SUP-1234`
5997

6098
Rocket.Chat should reply with details about the JIRA issue.
6199

62-
*Tip: If you want more details, append a + like this: `Let's check out SUP-1234+`*
100+
*Tip: If you want more details, append a `+` like this: `Let's check out SUP-1234+`*
63101

64102
## Troubleshooting
65-
If your messages aren't getting any replies, first check the log.
103+
104+
If your messages aren't getting any replies, first check the logs of Rocket.Chat and rocketchat-jira-trigger.
66105

67106
### HTTP 403 errors
68-
If you're getting HTTP 403 errors, it might be because CAPTCHA is enabled on your JIRA server and it wants you to manually re-authenticate. In that case, log out of JIRA in your browser and then log in again.
107+
108+
If you're getting HTTP 403 errors, it might be because [CAPTCHA](https://en.wikipedia.org/wiki/CAPTCHA) is enabled on your JIRA server and it wants you to manually re-authenticate. In that case, log out of JIRA in your browser and then log in again.
69109

70110
If you're still having trouble, feel free to [create an issue](https://github.com/gustavkarlsson/rocketchat-jira-trigger/issues/new) explaining your problem.
71111

72-
### Connection refused when using docker
73-
When using docker, you must NOT override the app port in the configuration file. The docker image is configured to
74-
only export export port 4567. You can change what port the container should listen to with the `-p` option.
112+
### Connection refused when using Docker
113+
114+
When using Docker, you must NOT override the app port in the configuration file. The Docker image is configured to
115+
only export export port `4567`. You can change what port the container should listen to with the `-p` option.

0 commit comments

Comments
 (0)