Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bitbucket and Jira deployment linking

Dustin Carl May 30, 2024

I'm trying to figure out how Bitbucket deployments get linked in Jira. 

We have a project with multiple repos (call it FE and BE) - we are a small team, so we have one JIRA project representing both repos (call it PRJ).

A developer today fixed multiple small things in a single branch. So the structure looked like this:

Branch Name: PRJ-01 fixes

  • Commit 1: PRJ-01 fix thing
  • Commit 2: PRJ-02 fix thing
  • Commit 3: PRJ-02 PRJ-03 fix multiple things

 

These were then put up for PR in a single PR into main (our prod branch). 

I merged the PR and deployed the branch, but only PRJ-01 is showing a deployment. 

The 'diff' when I deploy though showed all the linked issues correctly (also a way to export these would be great).

 

1 answer

1 vote
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 3, 2024

Hi Dustin Carl and welcome to the community!

Can you please clarify where exactly the deployment is missing? Is it when you open a certain Jira ticket (for PRJ-02 and PRJ-03), then open the Development panel for this ticket and select the Deployments tab?

Kind regards,
Theodora

Dustin Carl June 4, 2024

Yep, thats exactly where. I see the commits, builds, and PR's but I do not see the deployment. 

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 5, 2024

Hi,

I am not able to reproduce the issue you are reporting. Could you please provide some additional details to ensure I am reproducing it with a use case similar to yours?

  1. Does the Pipelines build with the deployment to production run on a branches definition, on a pull-requests definition, the default definition, or is it a custom pipeline?

  2. If the build runs on a branches definition, is it for the main branch?

  3. If you trigger the build manually (e.g. in case of a custom pipeline), which branch are you running it for?

  4. When you merge the PR from PRJ-01 fixes to the main branch, do you use a merge commit, fast-forward, or squash merge strategy?

  5. Is Commit 1 the last commit of the branch? Or is the last commit Commit 3?

Kind regards,
Theodora

Dustin Carl June 5, 2024

For sure!

 

- Branch definition for main

- Not the 'main' branch as defined in bitbucket (that's dev), but it is the 'production'' branch

- I can't remember if it was a manual run or not, but it would have been for main

- PRJ-01 was the last commit of the branch. If you take a look at the attached screenshot, only FLS-458 was picked up as deployed.

Very much appreciate you taking the time to help us out! :) 

Screenshot 2024-06-05 at 7.18.17 AM.png

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 5, 2024

Thank you for the info, @Dustin Carl, I'm happy to help!

  1. Can you also please let me know what merge strategy you used to merge the PR from PRJ-01 fixes into the destination branch? Did you use merge commit, fast-forward, or squash merge strategy?

  2. Just to make sure, the build ran for the destination branch of the PR, and not for the branch PRJ-01 fixes, is that correct?

For a faster resolution, I recommend creating a ticket with the support team for investigation. If we have an open support ticket, the engineer working on it will be able to access the deployment and the pull request and understand much quicker what has happened. I cannot access your repo without a support ticket, so the best I can do is try to reproduce based on the info you provide.

You can create a ticket via https://support.atlassian.com/contact/#/, in "What can we help you with?" select "Technical issues and bugs" and then Bitbucket Cloud as product. When you are asked to provide the workspace URL, please make sure you enter the URL of the workspace that is on a paid billing plan to proceed with ticket creation.

Otherwise, please let me know about the merge strategy and whether the build ran for the destination branch so I can try reproducing this.

Kind regards,
Theodora

Dustin Carl June 5, 2024

It was just a regular merge commit.

Weirdly though - we had a deployment this morning and everything linked up perfectly! 

If it happens again I will open a support ticket.

Thanks for the help Theodora, appreciate it!

Like Theodora Boudale likes this
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 7, 2024

Thank you for the update! It's good to hear that the next deployment worked as expected!

I'm afraid that I haven't been able to reproduce this with a setup similar to yours and a PR that is merged with a merge commit.

Please feel free to open a support ticket if it ever occurs again, or if you want us to investigate what happened with that specific deployment.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events