问题
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 ?
回答1:
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.
来源:https://stackoverflow.com/questions/9359891/jenkins-configuration