Interview Prep/Jenkins/SCM, multibranch & webhooks

Builds start twice for each push: once as `main` and once as a pull request, plus once from polling

BeginnerTroubleshootingSCM, multibranch & webhooks
Answer

Likely causes → pollSCM trigger in the Jenkinsfile plus webhooks, and branch discovery set to "All branches" with PR discovery.

Diagnose → Build causes (Started by an SCM change, Branch indexing, Push event to branch main).

Fix → Remove pollSCM when webhooks work; set branch discovery to exclude branches filed as PRs.

Prevent → Template-level conventions and review for triggers.

All Jenkins questions Roadmap: Jenkins

More on SCM, multibranch & webhooks