How does the Gerrit- trigger plugin in Jenkins works?

前端 未结 1 1483
我寻月下人不归
我寻月下人不归 2021-02-02 01:59

I am trying to understand how does the gerrit-trigger in Jenkins works in details? Also, how is the test for the triggered cose is being invoked ?

Thanks,

相关标签:
1条回答
  • 2021-02-02 02:23

    The gerrit trigger works like this:

    1. It connects to the gerrit server using ssh and uses the gerrit stream-events command

    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

    2. Jenkins user does not have the stream-events rights

    How to check:

    1. Login as jenkins user

    2. 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? 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

    0 讨论(0)
提交回复
热议问题