Skip to content
Permalink
Browse files
[FIXED JENKINS-14321] don't reuse last build environment for fast pol…
…ling
  • Loading branch information
ndeloof committed Aug 8, 2012
1 parent e1c5736 commit 3d9a73d26b129249c51fccfca6060280197b25eb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
@@ -678,7 +678,7 @@ protected PollingResult compareRemoteRevisionWith(AbstractProject<?, ?> project,
break;
}
}
final EnvVars environment = GitUtils.getPollEnvironment(project, workspace, launcher, listener);
final EnvVars environment = GitUtils.getPollEnvironment(project, workspace, launcher, listener, false);
IGitAPI git = new GitAPI(gitExe, workspace, listener, environment, reference);
String gitRepo = getParamExpandedRepos(lastBuild).get(0).getURIs().get(0).toString();
String headRevision = git.getHeadRev(gitRepo, getBranches().get(0).getName());
@@ -171,11 +171,17 @@ public List<Revision> filterTipBranches(Collection<Revision> revisions) {
return l;
}

public static EnvVars getPollEnvironment(AbstractProject p, FilePath ws, Launcher launcher, TaskListener listener)
throws IOException, InterruptedException {
return getPollEnvironment(p, ws, launcher, listener, true);
}


/**
* An attempt to generate at least semi-useful EnvVars for polling calls, based on previous build.
* Cribbed from various places.
*/
public static EnvVars getPollEnvironment(AbstractProject p, FilePath ws, Launcher launcher, TaskListener listener)
public static EnvVars getPollEnvironment(AbstractProject p, FilePath ws, Launcher launcher, TaskListener listener, boolean reuseLastBuildEnv)
throws IOException,InterruptedException {
EnvVars env;
StreamBuildListener buildListener = new StreamBuildListener((OutputStream)listener.getLogger());

1 comment on commit 3d9a73d

@ciaranj
Copy link
Contributor

@ciaranj ciaranj commented on 3d9a73d Aug 8, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should fix my out-standing pull request: #75 Would you mind closing it please ?

Please sign in to comment.