Question

I have a GIT repository. When I pushed a GIT change into Gerrit, it triggers a jenkins build and if successful, it merges the code to the GIT repository.

But, Jenkins is building the source from GIT repo always. It is not picking the change pushed into Gerrit.

What settings should I change in Gerrit/Jenkins ?

Was it helpful?

Solution

In the jenkins configuration for the git Source Code Management section, click the advanced button and set your refspec to $GERRIT_REFSPEC which will pick up the change set that was commit.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top