1. Add software name and first error message in subject 2. Add gcc version, error messages and job url in mail body
Signed-off-by: Cao Xueliang caoxl78320@163.com --- lib/git_bisect.rb | 2 +- lib/mail_bisect_result.rb | 20 +++++++++----------- 2 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/lib/git_bisect.rb b/lib/git_bisect.rb index 189edb8..97ad467 100644 --- a/lib/git_bisect.rb +++ b/lib/git_bisect.rb @@ -95,7 +95,7 @@ class GitBisect error_messages = ErrorMessages.new(@build_pkg_dir).obtain_error_messages_by_errorid(@error_id)
return Hash['repo' => @upstream_repo, 'commit' => first_bad_commit, - 'error_messages' => error_messages.join("\n")] + 'error_messages' => error_messages] end
# first search the good commit in db diff --git a/lib/mail_bisect_result.rb b/lib/mail_bisect_result.rb index 5a208c4..44a5645 100644 --- a/lib/mail_bisect_result.rb +++ b/lib/mail_bisect_result.rb @@ -19,23 +19,21 @@ class MailBisectResult end
def compose_mail - subject = "[Compass-CI] #{@repo}.git: bisect result" + subject = "[Compass-CI][#{@repo.split('/')[1]}]: #{@error_messages[0]}" + job_url = "job url: http://183.134.196.212:11300/#%7BENV%5B%27result_root%27%5D%7D%5Cn" ? ENV['result_root'] : '' body = <<~BODY Hi #{@git_commit.author_name},
- Bisect completed for + git url: #{@git_commit.url} + git commit: #{@commit_id[0..11]} ("#{@git_commit.subject}")
- url: #{@git_commit.url} - - This is a bisect email from compass-ci. We met some problems when test with new commits. - Would you help to check what happend? - After submitting a job we noticed an error response due to the commit: - - commit: #{@commit_id[0..11]} ("#{@git_commit.subject}") + gcc version: 7.3.0 error_messages: - #{@error_messages} + #{@error_messages.join("\n")}
- https://gitee.com/openeuler/compass-ci + #{job_url} + Regards, + Compass CI team BODY to = 'caoxl@crystal.ci' @hash = { 'to' => to, 'body' => body, 'subject' => subject }
- job_url = "job url: http://183.134.196.212:11300/#%7BENV%5B%27result_root%27%5D%7D%5Cn" ? ENV['result_root'] : ''
Please avoid hard coding IP.
Thanks, Fengguang
On Mon, Dec 14, 2020 at 02:39:57PM +0800, Wu Fengguang wrote:
- job_url = "job url: http://183.134.196.212:11300/#%7BENV%5B%27result_root%27%5D%7D%5Cn" ? ENV['result_root'] : ''
Please avoid hard coding IP.
Ok, I will fix it.
Thanks, Xueliang
Thanks, Fengguang