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

Issue

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

Environment

  • CloudBees Jenkins Enterprise - Managed Master (CJEMM)
  • CloudBees Jenkins Team (CJT)
  • CloudBees Jenkins Platform - Client Master (CJPCM)
  • DEV@cloud (D@C)
  • Git plugin

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*”

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.