I made a job with the following config :
parameters :
- GERRIT_REFSPEC default value refs/heads/release
- GERRIT_BRANCH default value $GERRIT_REFNAME
Git plugin config :
Url of repo : a right url
Refspec : $GERRIT_REFSPEC
Name or Repository : origin
Branch specifier : origin/$GERRIT_BRANCH
Gerrit Trigger config :
- Trigger on Change Merged , Ref Updated
- Dynamic config (..) (should be right)
My issue is on Ref Updated trigger, the log prints it fetches the origin/release (if I pushed directly on release) but in facts it does not get the checkout the last version.
eg : I updated an artifact version in a pom.xml, I push it by-passing gerrit, the refs updated triggers works and trigger my job but it does not take in account my pom.xml modification .
26/09/2012 11:08:48 Last Built Revision: Revision c436e2f4e5f92400b8011fe1579bc2e80ca11c07 (origin/release)
26/09/2012 11:08:48 Fetching changes from 1 remote Git repository
26/09/2012 11:08:48 Fetching upstream changes from ssh://gerrit.it.int/it-lang
26/09/2012 11:08:49 Commencing build of Revision c436e2f4e5f92400b8011fe1579bc2e80ca11c07 (origin/release)
26/09/2012 11:08:49 Checking out Revision c436e2f4e5f92400b8011fe1579bc2e80ca11c07 (origin/release)
and the git history :
26/09/2012 11:08:48 Last Built Revision: Revision c436e2f4e5f92400b8011fe1579bc2e80ca11c07 (origin/release)
26/09/2012 11:08:48 Fetching changes from 1 remote Git repository
26/09/2012 11:08:48 Fetching upstream changes from ssh://gerrit.it.int/it-lang
26/09/2012 11:08:49 Commencing build of Revision c436e2f4e5f92400b8011fe1579bc2e80ca11c07 (origin/release)
26/09/2012 11:08:49 Checking out Revision c436e2f4e5f92400b8011fe1579bc2e80ca11c07 (origin/release)
|