Search code examples
gitjenkinsjenkins-pluginsgerritgerrit-trigger

Gerrit Trigger only once for commits in all projects


I have 10 repos configured in gerrit trigger plugin. But what happens is, if a user has done code changes in all 10 repos and push the code then 10 builds get trigger.

How can we avoid that and have only one build triggered for this usecase


Solution

  • You can't avoid that, each push will generate an independent event on Gerrit which will trigger an independent build no Jenkins.

    By default, the builds will remain in the build queue until the first build is complete.

    If you really don't need to execute the queue builds you can try to add an initial build step to verify if a build has just finished and abort the execution of the current build.