i have a python script which is called from jenkins
job shell script. This python script could fail for multiple reasons. Based on the failure i need to catch the correct failure reason. I want this reason to be sent back to jenkins
shell some how and i will post this error message through an email or some other means of notification. I tried setting a environment variable and access it in post build. But that doesn't seem to work. Any help appreciated. Below is the sample text code
#!/usr/bin/python
a=False
b=True
if(a):
raise exception("a is true")
if(b):
raise exception("b is true")
I need this "a is true"
or "b is true"
response sent back to jenkins
shell and to fail the job.