Skip to content
Permalink
Browse files

Merge pull request #472 from jglick/buildsByBranchName-JENKINS-19022

[JENKINS-19022] Print a warning to the build log when the job seems to be in trouble due to buildsByBranchName bloat
  • Loading branch information...
MarkEWaite committed Feb 10, 2017
2 parents 16e366e + 5bb7eed commit cae9fb61ffcd2144278aec2255cef897cca569d0
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/main/java/hudson/plugins/git/GitSCM.java
@@ -1011,6 +1011,10 @@ public EnvVars getEnvironment() {
Build revToBuild = new Build(marked, rev, build.getNumber(), null);
buildData.saveBuild(revToBuild);

if (buildData.getBuildsByBranchName().size() >= 100) {
log.println("JENKINS-19022: warning: possible memory leak due to Git plugin usage; see: https://wiki.jenkins-ci.org/display/JENKINS/Remove+Git+Plugin+BuildsByBranch+BuildData");
}

if (candidates.size() > 1) {
log.println("Multiple candidate revisions");
Job<?, ?> job = build.getParent();

0 comments on commit cae9fb6

Please sign in to comment.
You can’t perform that action at this time.