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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Can I do a pre-merge test in BitBucket Pipeline?

So you have a load of pull requests ready to be merged to the same target branch.

They all pass their individual pipelines.

The target branch's pipeline has passed.

They can all be merged to their target branch and none of them will produce merge conflicts.

There is nothing at this point that will tell you that there is anything wrong.

Now, for arguments sake, no matter which pull request you merge first, it will cause all subsequent merges to fail in the pipeline (sometimes there's logic conflicts that are not obvious or recognised during development).

So, say one of the PRs get's merged. The pipeline runs on the merged target+PR in the target branch.

First PR merge passes.

Next PR merge fails.

As would any attempt to merge any of the other PRs.

 

What I would like to do is to have PRs pipelines to run as if they were a merge to their target.

Is this possible?

 

Also, is it possible to have all outstanding PRs run on this pattern if the target changes.


Yes. I understand that a LOT of outstanding PRs would do a lot of churn and costs in minutes.

Ideally, if a pipeline fails, putting the related task back to our "In Progress" state along with the reason ... ideal!!!

Joining up pipeline results to Jira Task statuses ... something automated here would be great.

 



1 answer

What I would like to do is to have PRs pipelines to run as if they were a merge to their target.

Is this possible?

Yes, that is possible for PR pipelines, however the PR pipelines are not automatically re-run when the target branch changes.

From your question I read it that this is the part you're interested in.

This has been asked about before [1], and the answer was, no, PR pipelines builds are not acting as gate-keeper builds, so you need to re-run them manually and/or more automated via the REST API for each target branch update. Or just rebase all active PR branches automatically and push them again as this will re-trigger their PR builds.

[1]: Faster feedback on merges with pull request pipelines  https://community.atlassian.com/t5/Bitbucket-discussions/Faster-feedback-on-merges-with-pull-request-pipelines/td-p/960230

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket Pipelines

What We Learned When We Researched Open Source Vulnerabilities in 7 Popular Coding Languages

...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...

1,326 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you