Is it possible to use the DevOps Analytics Report with Jenkins?
Asked by andrew_pass:

Hi,

Hoping someone can help please :)

We use Bitbucket Cloud and do deployments via Jenkins, I'm trying to get the deployment information feeding into the DevOps Analytics Report.

Currently we've managed to get alerts coming thru from Jenkins using the Jenkins integration but they come into the API report and not the DevOps report.

I'm also hoping to get this set up - <https://community.atlassian.com/t5/Opsgenie-articles/Update-Incident-Investigation-Our-new-Deployment-API-enables/ba-p/1338467>

Is the answer that we need to use the Deployment API?

<https://docs.opsgenie.com/docs/deployment-api>

Many thanks,

Andy


Answers:
author: Connor Eyles
body: Hi [@andrew_pass](/t5/user/viewprofilepage/user-id/3716231)

Thanks for reaching out! Connor here from the Opsgenie support team.

On the link you shared through, to get information feeding into the DevOps metrics report is connecting your Bitbucket workspace to Opsgenie.

DevOps metrics are more accurate and visualized better when you connect your Bitbucket workspaces to your Opsgenie account. This feature is currently only available for those who use Bitbucket as their VCS and deployment tool. Click here to find out more about connecting Bitbucket workspaces to Opsgenie.

Is this what you mean here? If not can you share with me what information you are wanting to feed into these reports.

I have also shared below the development API documentation which can be used to perform deployment-related actions with the [Investigate an incident](https://support.atlassian.com/opsgenie/docs/investigate-an-incident/) feature which allows you to track your deployments leading up to, and during incidents.

Some quick links to help you with this are:

* [Bitbucket to Opsgenie connection](https://support.atlassian.com/opsgenie/docs/use-opsgenie-with-bitbucket-cloud/)

* [Bitbucket repo-to-service mapping](https://support.atlassian.com/opsgenie/docs/map-bitbucket-repositories-to-opsgenie-services/)

* [Deployment API](https://docs.opsgenie.com/docs/deployment-api)

* [Devops metric report](https://support.atlassian.com/opsgenie/docs/view-global-devops-metrics/)

Thanks,

Connor

comments: author: Gustav Lasko
body: We have a similar situation, in that we don't use Bitbucket - we use Azure DevOps. We'd like to be able to use the OpsGenie analytic reports by telling the OpsGenie API when we've done a release. Is this functionality planned?


author: Connor Eyles
body: Hi [@Gustav Lasko](/t5/user/viewprofilepage/user-id/4673414)

In relation to your ask about Azure DevOps, we unfortunately dont have this functionality however we do have a feature request logged in our internal system (HEIMDALL-4787).

I am no Azure Devops specialist but a possible workaround here is connecting your Azure Devops projects with GitLab or Bitbucket and then connecting those GitLab or Bitbucket repositories with Opsgenie.

* <https://support.atlassian.com/opsgenie/docs/investigate-incidents-with-gitlab/>
* <https://about.gitlab.com/blog/2020/07/09/integrating-azure-devops-scm-and-gitlab/>
* [https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/bitbucket?view=azure-devops\&tabs=yaml](https://docs.microsoft.com/en-us/azure/devops/pipelines/repos/bitbucket?view=azure-devops&tabs=yaml)

Hope this helps!

Thanks,

Connor


author: andrew_pass
body: Hi [@Connor Eyles](/t5/user/viewprofilepage/user-id/3987748)

Apologies for the very delayed reply to this!

So am I right in thinking we need to add stuff for the **Create Deployment call**

<https://docs.opsgenie.com/docs/deployment-api#create-deployment>

So our JenkinsFile which will then send the info into OpsGenie each time we do a deployment?

Many thanks,

Andy


author: Justin Sitarz
body: Hi Andrew,

Justin here, filling in for Connor as he's out of office - happy to help!

But yes, that's exactly correct - you can create records of your deployments through the Create Deployment endpoint, and then can later use that data in the Incident investigation view of your incidents.

Having said that - if you run into any questions or issues as you set this up, please don't hesitate to reach back out here, or get in contact with us at support.atlassian.com or through the Opsgenie in-app chat.

Thanks!

Justin Sitarz

Atlassian Cloud Support


author: andrew_pass
body: Perfect, yeah we got it working now :)

Thanks Justin, just wanted to sense check before we went down a rabbit hole!

Cheers,

Andy


Tags: cloud

jenkins