Jenkins:Github webhook 不会触发任何工作

标签 jenkins

我尝试配置 Jenkins 。我想要一个简单的行为:根据新的拉取请求触发构建。

我无法理解我错过了什么......

Jenkins 版本:2.89.2

https://ci.mysite.fr/configure :

enter image description here

仍然没有触发构建:

enter image description here

https://ci.mysite.fr/job/test-back/configure :
enter image description here

在 Github 上,Webhook 被 Jenkins 发送并广受好评:

enter image description here

Nginx 日志也是这样说的:

enter image description here

请帮忙!

最佳答案

调试此类事情时要检查的一些事项:

  • 检查您的 Jenkins 日志以查看 Jenkins 是否收到了钩子(Hook)并出于某种原因决定不采取行动。
  • 通过单击 Manage Jenkins -> Configure Global Security 检查 Jenkins 安全性。尽可能多地敞开心扉,看看这是否会改变任何事情。
  • 确保您将更改推送到主分支。为简化起见,请考虑使用 ** 作为您的分支说明符,同时让它工作。
  • 通过单击 Manage Jenkins -> Global Tool Configuration
  • 确保在您的 Jenkins 主机上正确配置 Git
  • 确保您提供其凭据的用户可以管理 Hook 并从您感兴趣的存储库中提取。
  • 在 Jenkins 中手动运行作业,确保其正常工作。
  • 运行作业后,它应该显示为 protected 分支/所需状态中的一个选项。在您的 repo 中,单击 Settings->Branches,在 Branches 部分中选择您的分支,单击 Require Status Check to Pass before merging 选项,您的工作应该显示在出现的列表中。
  • 关于Jenkins:Github webhook 不会触发任何工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48117195/

    相关文章:

    java - 即使由于脚本中的错误处理(try 和 catch block )导致测试失败,Jenkins 也会显示 "Build Success"

    从 Jenkinsfile 设置构建参数时出现 Jenkins 错误

    Jenkins 插件开发 - Maven 问题 : Unknown packaging: hpi

    Jenkins 管道条件环境变量

    plugins - 在 Docker 中安装 Jenkins 插件 (mercurial) 显示在插件文件夹中,但不在 Jenkins 本身中

    java - pom.xml 中是否可以有两个 mainClass 或者能够在同一个 pom.xml 中运行两个类?

    angular - 由于 chrome 驱动程序,使用 Protractor 的端到端测试失败

    maven - 运行 Jenkins、Maven 和 QA 工具(PMD、Checkstyle 和 Findbugs)的问题

    authentication - 带证书的 Kubernetes 身份验证

    node.js - Groovy Script for Nodejs 插件无法在 Jenkins 上配置