Why a job is triggered multiple times for a git commit?

Article ID:115000618332
1 minute readKnowledge base

Issue

  • We saw that a job it is triggered multiple times when we do a commit

Resolution

If you take a look at the build and you see that every build has different hash and it is from a different branch, you should check your SCM configuration to see that the git plugin it is working as expected for your configuration, you probably have configured "Branches to build" as "" that means "origin/" thus all branches, so when you launch the job it launches a compilation for each new branch changed.

If you want only to compile changes on one branch or a set of, you have to set a proper value, for example, "/master" or "/branch-pattern*"