EMAIL_ADDRESS = (ENV['USER']).to_s.freeze
+def send_mail
- message = File.read(LOG).chomp
^----- how to get "LOG"?
in first patch have define LOG = 'walk-test.report', job result will write into walk-test.report.
- data = "
- subject: os rootfs test report
- to: #{EMAIL_ADDRESS}
- body: '#{message}'"
why to be different between "#{EMAIL_ADDRESS}" and "'#{message}'"?
no different, i will remove ''. Thanks, Yinsi
Thanks, Liushaofei
- %x(curl -X POST 'localhost:11311/send_mail_yaml' -d "#{data}")
+end
def write_report(report_all) file = File.open(LOG, 'a') log = Logger.new(file, 'weekly') -- 2.23.0