How does the Gerrit- trigger plugin in Jenkins works? How does the Gerrit- trigger plugin in Jenkins works? jenkins jenkins

How does the Gerrit- trigger plugin in Jenkins works?


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