Jenkins使用错误的邮件地址来邮寄构建结果

时间:2016-02-02 11:37:11

标签: git jenkins jenkins-plugins

我正在使用Jenkins的ext-mail和git插件来运行构建作业。当对存储库进行提交时,会按预期触发构建,但是使用错误的邮件地址来发送构建结果。我的.gitconfig:

[core]
  symlinks = false
  autocrlf = true
[user]
  name = Some One
  email = someone@domain.com
[color]
  ui = true
[merge]
  tool = bc3
[pack]
  packSizeLimit = 2g
[help]
  format = html
[diff]
  tool = bc3
[rebase]
  autosquash = true

但是构建日志表明选择了不同的邮件地址:

Sending email for trigger: Success
NOT overriding default server settings, using Mailer to create session
messageContentType = text/plain; charset=UTF-8
Adding user address someone@DESKTOP-E0LPDHF.domain.local, they were not considered an excluded committer
Successfully created MimeMessage
Sending email to: someone@DESKTOP-E0LPDHF.domain.local
Finished: SUCCESS

我忘记了一些设置吗?

谢谢!

1 个答案:

答案 0 :(得分:3)

知道了。看起来用户首先在.gitconfig文件中使用未配置的邮件地址。 Jenkins存储了此用户的默认地址($ JENKINS_HOME / users / someone /)。编辑此文件并重新启动jenkins似乎解决了这个问题。