Outgoing webhook integration for Rocket.Chat that summarizes any JIRA issues mentioned
You can run rocketchat-jira-trigger either natively (requires at JDK 8 to build and JRE 8 to run) or with Docker.
First download the source code and run:
./gradlew installDist
gradlew.bat installDist
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:
bin/rocketchat-jira-trigger config.toml
bin\rocketchat-jira-trigger.bat config.toml
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
:
docker run -v $(pwd)/config.toml:/app/config.toml -p 4567:4567 --rm -it gustavkarlsson/rocketchat-jira-trigger:latest
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:
Create a file with the .toml
extension and set it up like this:
[jira]
uri = "https://jira.mycompany.com"
username = "[email protected]"
password = "API_TOKEN"
Since mid 2019, Jira requieres e-mail and API_TOKEN in order to access REST API services.
Environment variables should follow the pattern: <section>_<key>
. Compare these examples with the above config file example to see the similarity:
export jira_uri="https://jira.mycompany.com"
export jira_username="[email protected]"
export jira_password="API_TOKEN"
setx jira_uri "https://jira.mycompany.com"
setx jira_username "[email protected]"
setx jira_password "API_TOKEN"
For lists of values, use a comma as a separator:
assignee,status,reporter,priority
For a list of all configuration settings, check out the defaults.
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.
In Rocket.Chat, set up an outgoing webhook pointing at the server on port 4567
. Example: http://server.mycompany.com:4567/
and write a message containing a known JIRA issue to try it out. Example: Let's check out SUP-1234
Rocket.Chat should reply with details about the JIRA issue.
If your messages aren't getting any replies, first check the logs of Rocket.Chat and rocketchat-jira-trigger.
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.
If you're still having trouble, feel free to create an issue explaining your problem.
When using Docker, you must NOT override the app port in the configuration file. The Docker image is configured to
only export export port 4567
. You can change what port the container should listen to with the -p
option.