0

I run a job on Jenkins server(version 1.624, Win7), which is basically a Python Script. I test some variables on the script and if they don't fall in a range, I exit python with error code and Jenkins fails the build job, and returns last few lines of the Python execution (where I print the error) as a log that is sent to users an email chain.

On successful build, nothing is sent to the user.

Say, in python, I also compare current variables with the ones that were run week before, and if they change considerably, that could be due to a wrong computation(error) or valid reason like change of data. In such case, I want that Jenkins does not fail the build, but sends a custom warning to users in email chain.

Is this possible? Do I need to add a package to Jenkins to accomplish this?

I also don't want a situation where every successful build (and comparison of old and new Python variables fall within a range acceptable) sends email to the users as that would be annoying.
Thanks
sedy

user915783
  • 689
  • 1
  • 9
  • 27

1 Answers1

1

It is possible, for example you can mark your build as unstable, as described here.

For custom emails, use Email-ext plugin.

Community
  • 1
  • 1
dreamzor
  • 5,795
  • 4
  • 41
  • 61