Have you tried with something more simple, like just calling .setText with
some random content?


On Wed, Nov 14, 2012 at 12:32 AM, Sven Finsterwalder <[email protected]>wrote:

> Ok here it is:
> That code is the pre-send script area:
>
> def deploymentJob =
> Jenkins.getInstance().getItemByFullName("deployment-universal")
> def colorDeployment = deploymentJob.getIconColor()
> def testJob =
> Jenkins.getInstance().getItemByFullName("selenium2-portalservices-Smoketests-windows-Chrome-2.2")
> def colorTestJob = testJob.getIconColor()
>
> if(colorDeployment == hudson.model.BallColor.BLUE && colorTestJob !=
> hudson.model.BallColor.BLUE){
>
>    def lastbuild = testJob.getLastBuild()
>    def build = testJob.getBuildByNumber(lastbuild.getNumber())
>    def logFilePath = build.getLogFile().getPath()
>    String logContent = new File(logFilePath).text
>
>    def i = logContent.indexOf("Running TestSuite")
>    def size = logContent.size()
>    def selOutput = logContent.substring(i,size)
>
>    logger.log(selOutput)
>    msg.setText(selOutput)
> }
>
>
> Am Dienstag, 13. November 2012 16:14:13 UTC+1 schrieb slide:
>>
>> Please show your code.
>>
>>
>> On Tue, Nov 13, 2012 at 8:01 AM, Sven Finsterwalder <[email protected]>wrote:
>>
>>> Hi,
>>>
>>> how can add text to the email that will be send.
>>>
>>>> msg - the MimeMessage object which can be modified
>>>
>>> I try it with the pre-send script, but it does not work :-(
>>> Please give me an example code line.
>>>
>>> Thanks
>>>
>>
>>
>>
>> --
>> Website: http://earl-of-code.**com <http://earl-of-code.com>
>>
>


-- 
Website: http://earl-of-code.com

Reply via email to