我正在使用 Jenkins 的 ext-mail 和 git 插件来运行构建作业。当对存储库进行提交时,构建会按预期触发,但使用错误的邮件地址来邮寄构建结果。我的.gitconfig:
[core]
symlinks = false
autocrlf = true
[user]
name = Some One
email = <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="42312d2f272d2c2702262d2f232b2c6c212d2f" rel="noreferrer noopener nofollow">[email protected]</a>
[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 <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1f6c70727a70717a5f5b5a4c544b504f325a2f534f5b5759317b70727e76713173707c7e73" rel="noreferrer noopener nofollow">[email protected]</a>, they were not considered an excluded committer
Successfully created MimeMessage
Sending email to: <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5f2c30323a30313a1f1b1a0c140b100f721a6f130f1b1719713b30323e36317133303c3e33" rel="noreferrer noopener nofollow">[email protected]</a>
Finished: SUCCESS
我是否忘记了一些设置?
谢谢!
最佳答案
明白了。看起来用户所做的第一个操作是在 .gitconfig 文件中未配置邮件地址。 Jenkins 存储了该用户的默认地址 ($JENKINS_HOME/users/someone/)。编辑此文件并重新启动 jenkins 似乎可以解决该问题。
关于git - Jenkins 使用错误的邮件地址来邮寄构建结果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35152372/