简体   繁体   English

Jenkins中的Gerrit- trigger插件是如何工作的?

[英]How does the Gerrit- trigger plugin in Jenkins works?

I am trying to understand how does the gerrit-trigger in Jenkins works in details? 我想了解Jenkins中的gerrit-trigger如何在细节中运作? Also, how is the test for the triggered cose is being invoked ? 另外,如何调用触发式cose的测试?

Thanks, 谢谢,

The gerrit trigger works like this: gerrit触发器的工作原理如下:

  1. It connects to the gerrit server using ssh and uses the gerrit stream-events command 它使用ssh连接到gerrit服务器并使用gerrit stream-events命令

  2. It then watches this stream as the data comes in 然后在数据进入时观察此流

  3. It will try to match the events to triggers that have defined in your projects 它会尝试将事件与您项目中定义的触发器相匹配

Potential pit-falls: 潜在的陷阱:

  1. Jenkins user has improper ssh credentials Jenkins用户拥有不正确的ssh凭据

  2. Jenkins user does not have the stream-events rights Jenkins用户没有stream-events权限

How to check: 如何检查:

  1. Login as jenkins user 以jenkins用户身份登录

  2. ssh -p 29418 jenkins@your.domain.com gerrit stream-events ssh -p 29418 jenkins@your.domain.com gerrit stream-events

  3. Push a commit to the server and you should see things on your stream 将提交推送到服务器,您应该看到流上的内容

Problems: 问题:

  1. ssh connection failed? ssh连接失败了吗? setup you ssh key pair 设置你的密钥对

  2. No streaming right? 没有流媒体吗? Go to the All-Projects->Access and under Global Capabilities add Stream Events to the Non-Interactive Users group 转到All-Projects-> Access并在Global Capabilities下将Stream Events添加到Non-Interactive Users组

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM