Sha256: 3a8966d2e713f5b398ffc153738e35de2d932a4eb13a9c04c47e2f6c65585249
Contents?: true
Size: 1.08 KB
Versions: 43
Compression:
Stored size: 1.08 KB
Contents
module Reporter class Mail attr_accessor :deploy_email_from attr_accessor :deploy_email_to attr_accessor :application_name attr_accessor :module_name attr_accessor :environment attr_accessor :version attr_accessor :worker def send(options={}) Helper.validates_presence_of deploy_email_from, "deploy_email_from not set" Helper.validates_presence_of deploy_email_to, "deploy_email_to not set" Helper.validates_presence_of application_name, "application_name not set" Helper.validates_presence_of module_name, "module_name not set" Helper.validates_presence_of environment, "environment not set" status = options[:status] || "done" message = options[:message] || "" worker.sendmail(:from => "#{deploy_email_from}", \ :to => "#{deploy_email_to}", \ :subject => "JENKINS: #{module_name} #{environment} #{application_name} #{status}", \ :body => "Module: #{module_name}\nEnvironment: #{environment}\nJob: #{application_name}\nVersion: #{version}\n#{status}.\n\n#{message}" ) end end end
Version data entries
43 entries across 43 versions & 1 rubygems