Module: Emails::Builds

Included in:
Notify
Defined in:
app/mailers/emails/builds.rb

Instance Method Summary collapse

Instance Method Details

#build_fail_email(build_id, to) ⇒ Object


3
4
5
6
7
8
9
10
# File 'app/mailers/emails/builds.rb', line 3

def build_fail_email(build_id, to)
  @build = Ci::Build.find(build_id)
  @project = @build.project

  add_project_headers
  add_build_headers('failed')
  mail(to: to, subject: subject("Build failed for #{@project.name}", @build.short_sha))
end

#build_success_email(build_id, to) ⇒ Object


12
13
14
15
16
17
18
19
# File 'app/mailers/emails/builds.rb', line 12

def build_success_email(build_id, to)
  @build = Ci::Build.find(build_id)
  @project = @build.project

  add_project_headers
  add_build_headers('success')
  mail(to: to, subject: subject("Build success for #{@project.name}", @build.short_sha))
end