Hi Vinod,
I have just performed this integration between Mattermost 5.18.0 and Jira 8.6.0 both running on a Ubuntu 18.04 T2.Small AWS instance. The integration into Jira has got a number of steps that need to be followed. I have just put a quick guideline of the high-level steps i have taken to perform the integration:
A. Under the System Console in Mattermost, Navigate to Plugins > Jira as an admin user.
Enable Jira Plugin there and allow users to attach/create Jira (depending on what you require)
Generate the Webhook secret (e.g. fTYdhyaHeiJEuObW8IhawVwfmrRJnBp_) and keep a note of it.
Test the Webhook secret in a browser:*http:// ecX-X-XX-X-XXX.us-east-2.compute.amazonaws.com:8065/plugins/jira/api/v2/webhook?secret=fTYdhyaHeiJEuObW8IhawVwfmrRJnBp_*
(Response: Request: GET is not allowed, must be POST)
Test the Webhook secret in a putty session using CURL:
curl -i -X POST -H ‘Content-Type: application/json’ -d ‘{“text”: “Hello, this is some text\nThis is more text. ”}’ WEBHOOK URL ABOVE
(Response: HTTP/1.1 200 OK
Date: Tue, 31 Dec 2019 12:48:21 GMT
Content-Length: 0) indicating the Webhook is enabled
B) In Jira, As a Jira System Administrator, go to Jira Settings > System > Advanced > WebHooks.
Create a new webhook:
- Name Mattermost, Status enabled,
- URL: WEBHOOK URL Above
-
Enable Issue, Project, User, Jira Software related events as required
- Leave Exclude Body unchecked to receive JSON
C) Login to Mattermost as an admin user and you will see a Jirabot is automatically created
Navigate to the private channel you would like you would like to receive the Jira updates in.
Type in the command:
A) /Jira install server JIRA URL (Jira instance)
A set of instructions will appear to
- Navigate to Settings > Applications > Application Links in Jira
- Enter: MATTERMOST URL:8065 as the application link.
- In Configuration URL confirm the Mattermost URL
- In Link Apps set the following values:
- Application Name: Mattermost (you can choose)
- Application Type: Generic App
- Check the Create Incoming Link value and click continue
- In the following App link values, set the following options
- Consumer Key: mattermost_http_ecX_X_XX_X_XXX_us_east_2_compute_amazonaws_com_8065
- Consumer Name: Mattermost
- Public Key: -----BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCr1XOEC80AK+U0v2sQsj95ZuGBqdh6WoUeeMgsuY0Cn1KFuBqjHPvvCucVVSwY8C0X3+h8ur+7HTPzqK4KWRCKVkhDQBSIRdDfCa4C3lJi/VliAYCaSpu06IFQwdPR9CslqQRqsNQDJFOb6bDzWeeap8FScT3iBhkDYeo02Lwy9QIDAQAB0-----END PUBLIC KEY-----
- Click Continue
B) /Jira Connect (this is where it is failing for you). After checking all of the above, Jira will connect to the Mattermost Webhook. The reason is your webhook doesn’t seem to have been setup correctly. You will receive a message:
The application Mattermost would like to have read and write access to your data on ecX-X-XX-X-XXX.us-east-2.compute.amazonaws.com. The application will be allowed to use your credentials to authenticate as you (Username) in the future. Click on the “Allow” button
C /Jira Subscribe. Select the project name, Event Types and Issues to be reported back to the Mattermost Channel. For different Mattermost Teams you can subscribe to different Jira projects to received updates.
Click on Set Subscription to finish
- Test the integration by viewing an issue: /Jira view within the Team Channel. A form will open up
- Ignore the gap between http and URL - due to posting rules. Ensure its a full URL
If you have any further queries please post them here and i will try and compare it to my integration.
Thanks and Happy New Year