Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phing : sending the full log by email?

I'm using phing for some automatic-building process on a project, and was wondering : how can I get the full log by email ?


When I launch phing by the command-line, the building-log is displayed ; I would like it :

  • sent by e-mail,
  • to several recipients,
  • whether the build succeeded or failed
  • ideally : with a subject for the mail telling if the build succeeded or failed
  • ideally : some kind of HTML mail, with formatting, colors, ... would be nice

I've though about piping the ouput of phing to the mail command, but I would like a solution that work on both Linux and Windows, and doesn't require the installation of any additional software...

Does anyone have an idea ?


As a sidenote : I've thought about adding some kind of "report" target, launched at the end of the build, but :

  • It is launched only if all previous targets did not fail
  • I don't see how to get the full-log in it
like image 810
Pascal MARTIN Avatar asked Sep 12 '09 11:09

Pascal MARTIN


2 Answers

Great idea; just added a ticket to implement this @ http://phing.info/trac/ticket/539

like image 58
Michiel Avatar answered Nov 07 '22 10:11

Michiel


I guess you could write a custom Phing build listener / logger handling your described use case. Take a look at this excellent blog post by Philip Norton, to get you going.

like image 44
raphaelstolt Avatar answered Nov 07 '22 11:11

raphaelstolt