Bitbucket Pipeline - how to disable merge of PR branch into source branch during pipeline run?

vitalii.motolyzhenko
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 31, 2024

I have RP into develop branch and its pipeline fails due to merge conflict with develop branch, but PR branch is build successfully.

Such behaviour creates a lot of interrupts because each time i have conflict i need to rebase/merge develop branch each time. But i don't want to do it before i am ready to merge my branch into develop. Also another situation when someone merged failing tests/code into develop and it just fails my build because it performs merge...

Is there option to disable this?

Here build output:

GIT_LFS_SKIP_SMUDGE=1 retry 6
git clone --branch="GNG-27214-apache-config-2" https://x-token-auth:$REPOSITORY_OAUTH_ACCESS_TOKEN@bitbucket.org/$BITBUCKET_REPO_FULL_NAME.git $BUILD_DIR
Cloning into '/opt/atlassian/pipelines/agent/build'...
....
git reset --hard 75bc588d7b9d HEAD is now at 75bc588d7b9 GNG-27214: fix
git config user.name bitbucket-pipelines
git config user.email commits-noreply@bitbucket.org
git config push.default current
git config http.${BITBUCKET_GIT_HTTP_ORIGIN}.proxy http://localhost:29418/
git remote set-url origin http://bitbucket.org/$BITBUCKET_REPO_FULL_NAME
git reflog expire --expire=all --all echo ".bitbucket/pipelines/generated" >> .git/info/exclude
CONFLICT_EXIT_CODE=3
git merge ae6870301591 --no-edit || exit $CONFLICT_EXIT_CODE

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 2, 2024

Hi Vitalii and welcome to the community!

This is standard behavior for pipelines running on a pull-requests definition and it is not possible to disable it:

It allows users to run pipelines builds on the merged code before actually merging the PR.

If you don't want to run builds on the merged code, you can use:

Please feel free to reach out if you have any questions.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events