Christian Neverdal
Christian Neverdal

Reputation: 5385

Gerrit+Jenkins: communicate results of non-blocking jobs?

I have two jobs A and B. Job A is triggering job B, but does not wait for the result. How can I make job B now communicate back to Gerrit that that has also been done?

Do I have to use the API?

Upvotes: 0

Views: 1597

Answers (1)

Ivan
Ivan

Reputation: 2330

Either use API: ssh -p 29418 review.example.com gerrit review --message "Job B ran extremely well" <sha1>

note 1: the quotes may be needed around the actual gerrit call

note 2: depending on branch strategy for your project you might also want to include <change_id> after <sha1>, since one sha1 may be present in different branches

Or make job A wait for job B's completion (one way is to turn on block until the other projects complete ).

The latter would be easier to use and gives more possibilities with reduced effort cost. The former, however, has an advantage of better customization.

Upvotes: 1

Related Questions