Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 68d9eb9
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/main/java/hudson/plugins/git/GitSCM.java
Expand Up @@ -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);
Expand Down

0 comments on commit 68d9eb9

Please sign in to comment.