Reputation: 699
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
Upvotes: 0
Views: 2307
Reputation: 5925
It is possible, for example you can mark your build as unstable, as described here.
For custom emails, use Email-ext plugin.
Upvotes: 1