Hi all, I need to get the Author and message of the latest commit that jenkins is building upon. I see that there are no env variables for it.
https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin#GitPlugin-Environmentvariables I used printenv to see the variables set and AUTHOR / COMMITTER EMAIL and NAME are not set at all. So I forked the source code to see what is happening and saw that name and email are populated from global config and not from the commit. GitSCM.java > > public void populateEnvironmentVariables(Map<String,String> env) { > String name = getGlobalConfigName(); > if (name!=null) { > env.put("GIT_COMMITTER_NAME", name); > env.put("GIT_AUTHOR_NAME", name); > } > String email = getGlobalConfigEmail(); > if (email!=null) { > env.put("GIT_COMMITTER_EMAIL", email); > env.put("GIT_AUTHOR_EMAIL", email); > } > } > > > Am I missing something here. Please let me know if anyone already captures the parameters I am mentioning, Pradeep -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/89940c4d-fd90-4573-934b-29cf1384a772%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
