0

Our current setup is to have a build triggered by pull request which will publish the output to a network location for testing. Once testing is completed then the pull request is accepted and merged into the main branch. I want to set up another build that looks for a pull request to be merged and then delete the output of the branch since we no longer need it. I can't seem to find any way to do this with Bitbucket Server, only Github. Is it even possible to do?

Cody Harness
  • 1,116
  • 3
  • 18
  • 37
  • Do you expect other commits to the target branch? If the only commits made to the target branch are merge commits, why not just set up a VCS trigger for commits to the target branch? Even if the answer is, "Yes," you can always write a script that deletes the branch if and only if it exists. – JZimmerman Aug 10 '23 at 22:28
  • @JZimmerman because I want to make sure I am targeting the correct folder to delete with the merge. If I just target the master branch then I don't have the merged branch name. I'll check if there's a way to get the commit message in TeamCity. – Cody Harness Aug 11 '23 at 13:02

0 Answers0