-1

I configured Bitbucket webhook to trigger on Repository push. After each merge (which also deletes the source branch) it triggers build, which fails in Codefresh because of deleted branch.

Does anyone have the same experience? How do you deal with it?

3
  • 2
    We usually use 'Pull Request' based bitbucket triggers to our build server, which helps avoid these issues and allows us more control of the CI system. Jul 6 at 8:37
  • Even with 'Pull Request' based bitbucket triggers we get failed builds because of deleted branches. Jul 7 at 21:06
  • When you define 'Pull Request' based bitbucket trigger you can control when it will be triggered - you can set it to trigger when a pull request is opened or code was updated, then it wont trigger when a branch was deleted. Jul 9 at 14:52
0

There are some issues with the way you have implemented your CI workflows:

  • It sounds like CodeFresh is attempting to do a build on the branch that is being merged and deleted. Instead, you should be building on your integration branch (e.g., Develop, master).
  • If you choose to adopt a Pull Request workflow, you'll still have this issue if the code is merged and the source branch is deleted before the branch build completes.

Consider implementing a workflow where you only build a branch if there is a Pull Request and the branch is updated. Otherwise, stick to compiling just the mainline integration branch. This will ultimately speed up your CI process as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.