Repo, gerrit & Jenkins co-working

387 Views Asked by At

I have a problem with getting Google's Repo, gerrit & Jenkins working together.

our setup:

we have a Repo build out of few git repositories, which are all on our gerrit server. Manifest is also there.

Workflow:

  • user do changes in few files which sits in different git repositories in the Rep.

  • user commit & push the changes to Code review.

Problem:

  • for each of the repositories, a separate gerrit code review is created.

  • For each of those code reviews, Jenkins is being triggered.

If the changes are inter-depended (which they usually do), the Jenkins build will fail, as it takes only the changes in one repository each time.

How do we make Jenkins/Gerrit co-op to get the full changes into one build (that will work)?

Thanks

1

There are 1 best solutions below

0
On

The configuration described here is very problematic,
and is sure to cause you grief in the future as well.

In the long run, consider one of those paths:

  • Reduce dependency between the components to the minimum
    (this is preferred)
  • Merge the code to a single repository

Meanwhile -

  • Make sure the verification-job (in Jenkins) checks-out the latest code from all the other repositories
    (those that are relevant for building this change)
  • Make (non-breaking) changes to one repository at a time
    (requires some planning, of course)