i can't recall the exact name but there is a jenkins option to execute some
groovy script. (if you are still using the old jenkins jobs NOT pipeline).
So based on the flag, execute the script that triggers the mail

On Thu, Feb 25, 2016 at 9:31 PM, varun umesh <varunumes...@gmail.com> wrote:

> I have test automation framework, and the test runs are driven through
> Jenkins. After the test run is completed, it generates a few custom test
> reports, as html file. In the report, i have a table with total number of
> errors as one of the column. I basically want to parse this html file and
> send out an email to a mailing list if the error is greater than 0.
>
> Here is what i have done till now, in my Jenkins job:
>
> a. Configured the job to run the tests [this is in an execute shell option
> and running my jar, as the test framework is a java application]
> b. I have a post build action, in which i execute a python code, which
> does the following:
>
> Step 1. Get the latest html report.
> Step 2. Parse this file.
> Step 3. If the error is > 0:
> then email_flag = true
> else:
> email_flag = false.
>
> Now is there a way i can use the above flags and send email notifications,
> via Jenkins plugins? I just want to understand the best way to do this. Any
> help is appreciated.
>
> P.S. I did some additional research and i see the Email-ext plugin [
> https://wiki.jenkins-ci.org/display/JENKINS/Email-ext+plugin]
> <https://wiki.jenkins-ci.org/display/JENKINS/Email-ext+plugin%5D> has a
> pre-send script option, but i just don't know how to use this to run the
> python code and handle the email messaging.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/8d43e8cb-d59c-4c9a-b732-8a1a029a813e%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/8d43e8cb-d59c-4c9a-b732-8a1a029a813e%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Regards
nirish okram

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAPzcO4ixZXuS%2BcTKsbpc5woYoAyGV0rjJNhCEg9mmZaByFhcrA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to