Initially it's Golang port of rocketchat-jira-trigger.
Outgoing Rocket.Chat webhook integration that summarizes mentioned
JIRA issues.
Additionally, it's support summarize Confluence documents.
You need go 1.16 or newer.
go get -u github.com/pru-mike/rocketchat-jira-webhook
vi config.toml
rocketchat-jira-webhook -config config.toml
git clone [email protected]:pru-mike/rocketchat-jira-webhook.git
cd rocketchat-jira-webhook
vi config.toml
docker build . -t rocketchat-jira-webhook
docker run --rm --name rocketchat-jira-webhook -p 4567:4567 -v $(pwd)/config.toml:/etc/rocketchat-jira-webhook/config.toml rocketchat-jira-webhook
# or
docker build --build-arg CONFIG=config.toml . -t rocketchat-jira-webhook
docker run --rm --name rocketchat-jira-webhook -p 4567:4567 rocketchat-jira-webhook
Configuration is differ from original rocketchat-jira-trigger
There is plenty of configuration options, the only required option is connection parameters in "jira" or "confluence". Connection could be configured one of or both.
For all other options there are reasonable defaults.
For minimal
and all
options see configuration examples.
alien-slugs alien blue-jira-software blue-jira contained-blue-jira-software contained-blue-jira contained-neutral-jira-software contained-neutral-jira contained-white-jira-software contained-white-jira neutral-jira-software neutral-jira stickman-apple stickman-bike stickman-excercise stickman-excercise2 stickman-excercise3 stickman-heart stickman-heart2 stickman-jump stickman-mail stickman-massage stickman-massage2 stickman-meditation stickman-relax stickman-run stickman-sauna stickman-shower stickman-spa stickman-sport stickman-sport2 stickman-study stickman-swimmer stickman-treadmil stickman-walker stickman-weightlifting stickman-yoga stickman-yoga2 stickman-yoga3 stickman-yoga4 stickman-yoga5 stickman stickman2
Atlassian icon gathered from official website. Other icons gathered from awesome https://icon-icons.com/ and has CC Atribution License.
First you need to start rocketchat-jira-webhook
Second you need to going to Rocket.Chat administration panel and setting up outgoing webhook pointing at rocketchat-jira-webhook instance.
The Rocket.Chat configuration process should looking something like that
- Going to /admin/integrations/new/outgoing
- Set "Event Trigger" to "Message Sent"
- Choose proper "Name (optional)" for integration, like "Jira Webhook"
- Set "Channel" to all_direct_messages
- Set URLs to YOUR rocketchat-jira-webhook with proper route like http://jira-webhook.mycorp.com:4567/jira (see below)
- Set User to valid rocket chat user with bot rights
- Erase Token (or save it and add to rocketchat-jira-webhook config file)
- Click Save and make sure there is no any error and configuration saved successfully
There is three route you can point your Rocket.Chat instance
/jira - only jira issues would be summarized at this route
/confluence - only confluence issues would be summarized at this
/jiraconfluence - and both would be summarized at this
After configuration complete you can write a message containing some JIRA issues or Confluence documents. For example: TEST-1234
or something like https://confluence.mycompnay.com/dispaly/TST/test+page
Then rocketchat-jira-webhook will try to gather details about issues or document and reply it to Rocket.Chat if found some.
Connections can be checked with /health route.
curl http://localhost:4567/health
{"ok":true,"jira":{"name":"JIRA Bot","error":""},"confluence":{"name":"Confluence Bot","error":""}}
If something going wrong and you does not see replay from webhook, you should
- Try to check /health url, is you connection ok?
- Run application with log_level = "debug" and examine application log, is there any error?
- If there is 'found jira keys' or 'found confluence ids' message and no any errors, then webhook successfully replay to Rocket.Chat, and you need to examine Rocket.Chat logs, is any errors there?
- Additionaly you could try to run Rocket.Chat in isolated local environment with Docker with you version and config, it is far more easier to examine logs with this rather then on heavy load production instance