-
Bug
-
Resolution: Fixed
-
Major
-
None
-
Hudson 1.430, Git plugin 1.1.12, Ubuntu/natty amd64
When releasing a Maven job using Maven 2 Release Plugin, the configured user.name and user.email settings are not applied for the Maven commits and taggings of releases. See this sample, the author user name and email default to Unix login name of the application server running Jenkins.
commit 00a499650895084f8168bddded3d263d15fdd7cf
Author: www-data <www-data@localhost>
Date: Mon Sep 19 15:49:17 2011 +0300
[maven-release-plugin](anonymous)prepare for next development iteration
commit 53e2b1015c8b036def61f9f708baf37fc06c9697
Author: www-data <www-data@localhost>
Date: Mon Sep 19 15:49:14 2011 +0300
[maven-release-plugin](anonymous)prepare release tags/7
I've prepared a patch that moves setting of the user.name and user.email environment variables to GitSCM.buildEnvVars() thus these variables get applied for all invocations of git.
The patch is available at https://github.com/tjormola/git-plugin/commit/dc96d3578bb926bc411ba4978d5d42125def608e.
With this patch applied, the following kind of commit info is added to the repo when performing a release, as expected. See the author name and email, these now match the global configuration of "Jenkins CI" and "jenkins@example.com" in this sample setup.
commit d4d9a8fec7b7becbaede8096886e844ca6145a67
Author: Jenkins CI <jenkins@example.com>
Date: Tue Sep 20 04:08:56 2011 +0300
[maven-release-plugin](anonymous)prepare for next development iteration
commit 3298478577bb851a014cbf66f77ab0b73bb9227c
Author: Jenkins CI <jenkins@example.com>
Date: Tue Sep 20 04:08:53 2011 +0300
[maven-release-plugin](anonymous)prepare release tags/8