Skip to content

Display Deployment information within Jira

Problem to solve

When using Jira integration there are automatic notifications for commits and merge requests mentioning a particulare Jira issue, it would be nice to have a notification even when a merge request is deployed to an environment. This would hep Jira-only users to know where and when a particular piece of code is available to customers in some testing or production environment.

Intended users

This feature could be useful in a particolar way to team members that use Jira and may not have access to gitlab. At this time to see if a particular MR has been deployed to an environment they have to exit Jira (interrupting their workflow) and go to the MR page. So, if Gitlab was able to push a comment when a MR is deployed they could see in Jira history, allowing them not only to know that code has been deployed, but also when it was deployed.

Example Payload

curl --request POST \
  --url 'https://your-domain.atlassian.net/rest/deployments/0.1/bulk' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "properties": {
    "accountId": "account-234",
    "projectId": "project-123"
  },
  "deployments": [
    {
      "deploymentSequenceNumber": 100,
      "updateSequenceNumber": 1,
      "issueKeys": [
        "ABC-123"
      ],
      "displayName": "Deployment number 16 of Data Depot",
      "url": "http://mydeployer.com/project1/1111-222-333/prod-east",
      "description": "The bits are being transferred",
      "lastUpdated": "2018-01-20T23:27:25.000Z",
      "label": "Release 2018-01-20_08-47-bc2421a",
      "state": "in_progress",
      "pipeline": {
        "id": "e9c906a7-451f-4fa6-ae1a-c389e2e2d87c",
        "displayName": "Data Depot Deployment",
        "url": "http://mydeployer.com/project1"
      },
      "environment": {
        "id": "8ec94d72-a4fc-4ac0-b31d-c5a595f373ba",
        "displayName": "US East",
        "type": "production"
      },
      "schemaVersion": "1.0"
    }
  ],
  "providerMetadata": {
    "product": "Bamboo 6.10.2"
  }
}'

Resources

Edited by Patrick Deuley