简体   繁体   English

根据发布到补丁集的评论,gerrit-trigger 不会触发 jenkins 工作

[英]gerrit-trigger is not triggering jenkins job based on the comment posted to patchset

Jenkins Version: 2.73.1 Gerrit-Trigger plug-in version: 2.27.1 Gerrit Version: 2.14.2 Jenkins 版本:2.73.1 Gerrit-Trigger 插件版本:2.27.1 Gerrit 版本:2.14.2

my scenario here is:我的情况是:

New patch set triggers job 1, job1 posts a message (build first) to that patch set, then job2 should be triggered by that comment, but job2 is not triggered for some reason.新补丁集触发作业 1,作业 1 向该补丁集发布消息(先构建),然后作业 2 应由该评论触发,但由于某种原因未触发作业 2。 Below is the configuration of job 1 and job 2下面是作业 1 和作业 2 的配置

Job 1 Configuration in Gerrit events: Gerrit 事件中的作业 1 配置:

在此处输入图片说明

Job 2 Configuration in Gerrit Trigger >> Trigger on Gerrit触发器中的作业2配置>>触发在此处输入图片说明

After job 1 executed successfully, this should send a custom message (build first) to patch set and job 2 should trigger based on the message.作业 1 成功执行后,应向补丁集发送自定义消息(先构建),作业 2 应根据消息触发。

Job 2 is not triggering in this case.在这种情况下,不会触发作业 2。 Don't know what wrong here.不知道这里出了什么问题。

This is not a complete solution as I believe there may be another way to reproduce the issue but we discovered that we can reproduce this issue if we enable the 3 checkboxes:这不是一个完整的解决方案,因为我相信可能有另一种方法可以重现该问题,但我们发现如果启用 3 个复选框,我们可以重现此问题:

  • Build Current Patches Only仅构建当前补丁
  • Abort new patch sets中止新补丁集
  • Abort manual patch sets中止手动补丁集

By disabling these settings Jenkins will no longer abort old job builds if a newer patch is available but it will allow Gerrit Trigger to respond to it's own Gerrit Comments thus triggering additional builds.通过禁用这些设置,如果有更新的补丁可用,Jenkins 将不再中止旧的作业构建,但它将允许 Gerrit Trigger 响应它自己的 Gerrit Comments,从而触发额外的构建。

We have another system we deployed that experiences this issue but even disabling those 3 checkboxes did not resolve it for that system.我们部署的另一个系统遇到了这个问题,但即使禁用这 3 个复选框也无法解决该系统的问题。 I feel like certain settings configurations may cause Gerrit Trigger to ignore it's own comments thus not allowing you to create a job that triggers another job by modifying the success/fail messages of the first job.我觉得某些设置配置可能会导致 Gerrit Trigger 忽略它自己的注释,从而不允许您通过修改第一个作业的成功/失败消息来创建触发另一个作业的作业。

I ran into this issue recently with Jenkins 2.235.1 talking to gerrit 2.16.9我最近在 Jenkins 2.235.1 与 gerrit 2.16.9 交谈时遇到了这个问题

I found an option in Jenkins我在詹金斯找到了一个选项

  • Jenkins->Manage Jenkins->Gerrit Trigger Jenkins->Manage Jenkins->Gerrit Trigger
  • Edit Gerrit Instance编辑 Gerrit 实例
  • Click Advanced单击高级
  • Ensure "Trigger on all comments, even default users" is enabled确保启用“触发所有评论,甚至默认用户”

Not sure if this was added to address the issue documented here or not but it fixed my issue after enabling this and rebooting jenkins.不确定这是否是为了解决此处记录的问题而添加的,但它在启用此功能并重新启动 jenkins 后解决了我的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Jenkins Gerrit-Trigger在成功运行作业后未报告+1 - Jenkins Gerrit-Trigger not reporting +1 verified after successful job run 如何基于提交味精跳过由Gerrit补丁集触发的Jenkins作业 - How to skip Jenkins job triggered by gerrit patchset based on commit msg Jenkins Gerrit-trigger 留下评论 - Jenkins Gerrit-trigger leaving comments Jenkins 通过 gerrit-trigger 插件建立在标签推送上 - Jenkins builds on tag pushes via gerrit-trigger plugin Jenkins Gerrit-Trigger插件:如何为每次推送而不是每次提交开始构建 - Jenkins Gerrit-Trigger plugin: How to start build for each push instead of each commit Jenkins不会在Gerrit事件上触发工作 - Jenkins doesn't trigger job on gerrit event 如何使用Gerrit在Jenkins中触发特定于Maven的工作 - How to trigger maven specific job in Jenkins with Gerrit Gerrit不会触发我的詹金斯工作 - Gerrit does not trigger my jenkins job Jenkins Gerrit触发器插件提供了已编码的GERRIT_CHANGE_COMMIT_MESSAGE和GERRIT_EVENT_COMMENT_TEXT - Jenkins Gerrit trigger plugin gives encoded GERRIT_CHANGE_COMMIT_MESSAGE and GERRIT_EVENT_COMMENT_TEXT 参数化的远程触发器未触发远程詹金斯作业 - Parameterized Remote Trigger is not triggering the remote jenkins job
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM