Permalink
Browse files

Merge pull request #136 from deepsmgt/master

Support for GIT_URL in environment JENKINS-16684
  • Loading branch information...
ndeloof committed Feb 20, 2013
2 parents 4a4b5db + f06c418 commit 68d9eb934d638efd6a3146140cd9868b5e1c137f
Showing with 12 additions and 1 deletion.
  1. +12 −1 src/main/java/hudson/plugins/git/GitSCM.java
@@ -1373,7 +1373,18 @@ public void buildEnvVars(AbstractBuild<?, ?> build, java.util.Map<String, String
env.put(GIT_COMMIT, commit);
}
}


if(userRemoteConfigs.size()==1){
env.put("GIT_URL", userRemoteConfigs.get(0).getUrl());
}else{
int count=1;
for(UserRemoteConfig config:userRemoteConfigs) {
env.put("GIT_URL_"+count, config.getUrl());
count++;
}
}


String confName = getGitConfigNameToUse();
if ((confName != null) && (!confName.equals(""))) {
env.put("GIT_COMMITTER_NAME", confName);

0 comments on commit 68d9eb9

Please sign in to comment.