Pipeline Deployments - Links to Jira Tickets
Asked by Andy Rouse:

I was hoping to understand a clear definition of how Bitbucket/Jira interact in order to understand all of the Jira Tickets which are included within a deployment run via a pipeline. It appears to be automatic, but I'm unclear from the documentation exactly how Bitbucket works it out.

There are various triggers for pipelines, so it would be good to understand:

* Pull Requests
* Commits
* Merge Commits
  * Standard
  * Fast Forward
  * Squash
* Manual

I can probably guess how it works for Pull Requests, single Commits and standard merge commits, but it would be good to get confirmation.


Answers:
author: Mark C
body: Hi [@Andy Rouse](/t5/user/viewprofilepage/user-id/5068265)  

Welcome to the community.  

For the Pipelines Deployments, would it be possible for you to confirm if you're referring to the Pipelines Delployments UI like the way how it shows information in relation to Jira issues?  

Regards,  
Mark C

comments: author: Andy Rouse
body: [@Mark C](/t5/user/viewprofilepage/user-id/1210823) - Yes - I'd like to understand how the Deployments UI "knows" which Jira tickets to link to a deployment and show in the UI.


author: Mark C
body: Hi [@Andy Rouse](/t5/user/viewprofilepage/user-id/5068265),

Thanks for the confirmation.

The Pipelines Deployments UI is based on a difference between the current state and the state after deployment.  
When you view a specific build, the UI result compares it to the previous build listing all differences in the following tabs including Jira issue keys:

* Commits
* Diff
* Pull requests
* Issues (including Jira issue keys)

For example, if you have the 5 Pipelines builds below and you view build **#215** on your Deployments UI, the modal will compare build **#215** to **#214** and list all their differences.

1. **Build #215**
2. **Build #214**
3. Build #213
4. Build #212
5. Build #211

Having said that, there may be instances where no differences will be listed.  
A common example here is when a build was a rerun or redeployed.  
This is because there are no differences between the current build and the rerun/redeployed build.

Hope it helps and do let me know if you have further questions that I can help with.

Regards,  
Mark C


author: Andy Rouse
body: Mark,

Thank you for getting back to me. Apologies, I'm not sure if I understand how the system compares the differences between builds in order to understand which tickets, etc.

Is a build always related to a specific (most recent) commit? Does it compare the difference between 2 commits upon which 2 builds are related?

Thanks,

Andy


author: Mark C
body: Hi [@Andy Rouse](/t5/user/viewprofilepage/user-id/5068265)  

Indeed, it compares the commits between the state before deployment and after for the specified environment.  

Regards,  
Mark C


author: Andy Rouse
body: Thanks [@Mark C](/t5/user/viewprofilepage/user-id/1210823) - I look forward to getting our automations up and running


author: Andy Rouse
body: [@Mark C](/t5/user/viewprofilepage/user-id/1210823) - Apologies for coming back to this so late - Would it be at all possible to get a technical definition of what a "build" is in this context? I really want to understand what we're implementing if we get into deployments, how a roll-back might work, etc.

Our current git/environment strategy don't support using deployments in pipelines, so I'd like to make sure i understand everything before committing to what would be a pretty major change of strategy, just so we can use the deployments functionality :)


author: Mark C
body: HI [@Andy Rouse](/t5/user/viewprofilepage/user-id/5068265)  

Build in this context refers to your Pipeline builds triggered from various places and there are several places to trigger a build. You can check this documentation on [Pipeline start conditions](https://support.atlassian.com/bitbucket-cloud/docs/pipeline-start-conditions/).

Also, I've noticed that you have a paid workspace at the moment.  
Hence, I'd highly recommend that we continue our discussion in a support ticket. That way, we can access your specific repository and configuration and see where you are at the moment in setting up Bitbucket Cloud Pipelines deployments.  

You can raise a support ticket here: <https://support.atlassian.com/contact/#/>  

Regards,  
Mark C


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

deployment

jira-cloud