cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
780
Views
0
Helpful
4
Replies

Integrating Webex BOT with Jenkin Server

o1
Cisco Employee
Cisco Employee

Hi Team, I have a python script which gets executed after specific time interval & notifies me on webex as well as by sending the mail, once a specific condition the script reaches to.

If I execute the same script, using Jenkins "Freestyle Project", I dont get any notifications on the BOT or do not receive any mail. Do I need to have any additional configs on my Jenkins server to achieve this?

4 Replies 4

sandiban
Cisco Employee
Cisco Employee

Hello @o1,
Thanks for your patience so far!
unfortunately this is not something our area of expertise since it looks to be the deployment on the Jenkins is not working here somehow.
In case the Bot usually not responding in your local as expected, then we could check on this.

And I also don't think there is any Webhook is involved in it, is that correct! I think your code is just triggering the Bot to send some messages one a specific on a specific room/space on a specific interval.
So, I don't even think it's a Webhook side glitch as well, but hopefully once the project is deployed on Jenkins - possibly that script is not getting triggered on those intervals.

This is something needs to be checked from Jenkins side if your deployment is fine. At least without any error details provided, we can't investigate much on this.

Regards!
Sandip

o1
Cisco Employee
Cisco Employee

Thanks Sandip for your reply. My script is working totally fine locally. I am getting required notifications on the BOT when the script is executed locally. As you mentioned, there is no Webhook involved. My script is triggering the Bot to send some messages once a specific condition is reached, on a specific room/space on a specific interval.

When the same script is executed through the jenkins server, script is not getting aborted with any failures (which was the earlier case), but script continuously runs in the background as per the expectations, but I don't get any notification messages though the required condition is reached. Do I need to have any additional installation on Jenkins server wrt Webex?

sandiban
Cisco Employee
Cisco Employee

Hello @o1
So there is no specific requirement for Webex code to deploy through Jenkins server as per my knowledge so far, however it looks to be more of a Jenkins side query which needs to be answered by the Jenkins support team.
But since you're not using the Webhook here, I'm not exactly sure how you're triggering the Bot here to send some messages at a specific interval, may be your code is something like - if it's a 12 o'clock, your Bot will send a notification saying "Good afternoon" based on the system timezone and timestamp. But in such case, Bot needs a trigger to send a message in reply. Basically the Bot needs to be woke up from sleep mode asking it to perform something. And the only way to wake a Bot up is by calling/mentioning the Bot Name in a message, else the Bot would never be responsive.
So, when you were keeping the bot code in your local, probably that trigger was somehow working fine. But once it's deployed in a Server, that manual (considering the trigger was manual when your code was in local) trigger to the Bot was working fine. But hopefully that trigger is currently missing.

So, you minutely try to figure out if somehow that Bot triggering was working any way differently when the code was getting executed in your local and if that part is currently missing when the code is deployed in the Server.
That's the only point I can think of which might be restricting the Bot to perform as per the design.

Could you kindly check and confirm on this part please.

Regards!
Sandip

Sounds like perhaps the Python environment/context where the Jenkins job is getting executed is different than the one you are using locally.  If so, I would expect some kind of error messages in the job output...?
You may need to ensure that the correct version of Python is installed on the Jenkins server, and that any virtual environment being used is set up correctly in the commands...