[JIRA] (JENKINS-15313) Trigger on Updated Change does not fetch the last commit

2012-09-26 Thread gbouge...@gmail.com (JIRA)














































Greg BOUGEARD
 commented on  JENKINS-15313


Trigger on Updated Change does not fetch the last commit 















I shoud precise I'm using gerrit 2.4.1



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira






[JIRA] (JENKINS-15313) Trigger on Updated Change does not fetch the last commit

2012-09-26 Thread gbouge...@gmail.com (JIRA)














































Greg BOUGEARD
 commented on  JENKINS-15313


Trigger on Updated Change does not fetch the last commit 















I made some tests :

First job :

	Triggered on Change Merged
	Git config : Refspec = $GERRIT_REFSPEC , Branch to build  = $GERRIT_BRANCH



Second job :

	Triggered on Update Refs
	Git config : Refspec = null, branch to build = $GERRIT_REFNAME




1 test : git push bypassing code review.
Second job is well triggered. It checks out the right code (I checked it on the jenkins job workspace with a git log).
=> Test success, that it is exactly what I expected

2 test : git push to code review then submit
First job is well triggered. It DOES NOT check out the right code. (I checked it on the jenkins job workspace with a git log) In my case it's 3 commits late.
Second job is triggered too (NOT EXPECTED!) but it checks out the right code.
=> Test failed. First job is well triggered but does not checks out the right code, second job is triggered but I did not want to.

Was I wrong on some config?
I can give you the parameters for each test & job if it can help you.




























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira






[JIRA] (JENKINS-15313) Trigger on Updated Change does not fetch the last commit

2012-09-26 Thread rsand...@java.net (JIRA)














































rsandell
 commented on  JENKINS-15313


Trigger on Updated Change does not fetch the last commit 















Change Merged is a "change based" event so I think that the refspec should be there, it is only the ref updated that is special. So I think that the two last jobs could be merged into one.

But I haven't tested it my self 



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira






[JIRA] (JENKINS-15313) Trigger on Updated Change does not fetch the last commit

2012-09-26 Thread gbouge...@gmail.com (JIRA)














































Greg BOUGEARD
 commented on  JENKINS-15313


Trigger on Updated Change does not fetch the last commit 















When I saw the 2.6.0 announcement I was happy because I was going to refactor some jobs into in a single one.
But if I well understand you, I still have to have  :

	1 job triggered on Refs Updated (without any params)
	1 job triggerd on Change Merged (without any params)
	1 job manually triggerd (with REFSPEC and BRANCH params)



The three jobs will do the same thing (mvn deploy), but because the trigger is different, I have to keep three jobs.
(Maybe I can merge the two first ones?)



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira






[JIRA] (JENKINS-15313) Trigger on Updated Change does not fetch the last commit

2012-09-26 Thread rsand...@java.net (JIRA)














































rsandell
 commented on  JENKINS-15313


Trigger on Updated Change does not fetch the last commit 















The refUpdated event that gerrit sends does not contain a ref spec, since it is not tied to a change. So there is no parameter added to the build named GERRIT_REFSPEC when it is triggered bu a ref updated event.

This makes it hard to easily configure a job to trigger on both "change based" events and ref updated events. unless you use a bash script or something to check out the code.

I missed to add that to the help text.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira






[JIRA] (JENKINS-15313) Trigger on Updated Change does not fetch the last commit

2012-09-26 Thread gbouge...@gmail.com (JIRA)














































Greg BOUGEARD
 created  JENKINS-15313


Trigger on Updated Change does not fetch the last commit 















Issue Type:


Bug



Assignee:


rsandell



Components:


gerrit-trigger



Created:


26/Sep/12 9:14 AM



Description:


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)




Environment:


jenkins 1.482 Gerrit Trigger 2.6.0




Project:


Jenkins



Priority:


Major



Reporter:


Greg BOUGEARD

























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira