首页 > 解决方案 > 如何将 rundeck 作业结果发布到 webhook

问题描述

如何将 rundeck 作业结果发布到 webhook?

在 rundeck 作业 UI 中,我可以选择“webhook”选项,但是要在该框中放入什么?

我知道如何在 python 中编写命令行发布到 webhook,但不知道如何处理 rundeck。

标签: webhooksrundeck

解决方案


您可以将 webhook 变量传递给预定义的 url 以接收它,例如:

http://server/callback?id=${execution.id}&status=${execution.status}&trigger=${notification.trigger}

你可以在这里看到完整的参考:

https://rundeck.org/docs/manual/notifications/webhooks.html

你有一个很好的 CGI 示例来接收 Webhooks 参数:

https://gist.github.com/gschuler/4219733


推荐阅读