Skip to content
Permalink
Browse files

[FIXED JENKINS-9253] Added GIT_COMMIT environment variable available …

…during build.
  • Loading branch information
abayer committed Apr 5, 2011
1 parent e603bb0 commit 58a2cb35efd1df046bbf2de88d9c168cc3ef3beb
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/main/java/hudson/plugins/git/GitSCM.java
@@ -1135,6 +1135,14 @@ public void buildEnvVars(AbstractBuild<?,?> build, java.util.Map<String, String>
if(branch != null){
env.put(GIT_BRANCH, branch);
}
BuildData bd = fixNull(getBuildData(build, false));
if (bd != null) {
String commit = bd.getLastBuiltRevision().getSha1String();
if (commit != null) {
env.put(GIT_COMMIT, commit);
}
}

}

private String putChangelogDiffsIntoFile(IGitAPI git, String branchName, String revFrom,

0 comments on commit 58a2cb3

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