Interview Prep/Jenkins/Multibranch, organization folders & webhooks

How do you avoid building the same commit twice (branch and PR)?

BeginnerConceptMultibranch, organization folders & webhooks
Answer

In the branch discovery trait choose Exclude branches that are also filed as PRs. Then a feature branch with an open PR is built only as PR-123, while main and branches without PRs build as branches. Choose PR strategy Merging the pull request with the current target branch revision so you test what will actually land.

All Jenkins questions Roadmap: Jenkins

More on Multibranch, organization folders & webhooks