Skip to content
Permalink
Browse files

Merge pull request #102 from ciaranj/make_fast_poll_use_master_env

[FIXES JENKINS-14321] - Do not re-use last build's environment for remote polling
  • Loading branch information...
ndeloof committed Mar 12, 2013
2 parents 90a8af4 + d69b9c0 commit 18e799814060256cabc7b607c919f356c184352f
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/main/java/hudson/plugins/git/util/GitUtils.java
@@ -175,7 +175,7 @@ public static EnvVars getPollEnvironment(AbstractProject p, FilePath ws, Launche
StreamBuildListener buildListener = new StreamBuildListener((OutputStream)listener.getLogger());
AbstractBuild b = (AbstractBuild)p.getLastBuild();

if (b != null) {
if (reuseLastBuildEnv && b != null) {
Node lastBuiltOn = b.getBuiltOn();

if (lastBuiltOn != null) {
@@ -204,7 +204,7 @@ public static EnvVars getPollEnvironment(AbstractProject p, FilePath ws, Launche
if(rootUrl!=null) {
env.put("HUDSON_URL", rootUrl); // Legacy.
env.put("JENKINS_URL", rootUrl);
env.put("BUILD_URL", rootUrl+b.getUrl());
if( b != null) env.put("BUILD_URL", rootUrl+b.getUrl());
env.put("JOB_URL", rootUrl+p.getUrl());
}

0 comments on commit 18e7998

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