>________________________________
> From: Avihay Eyal <avihay.e...@gmail.com>
>To: jenkinsci-users@googlegroups.com 
>Cc: dirk.heinri...@recommind.com 
>Sent: Sunday, August 4, 2013 12:37 PM
>Subject: Re: CI usability - isn't there a problem that tests are executed only 
>after a developer pushed his changed to the repsitory?
> 
>
>
>I'm using Mercurial, which is a distrusted source control.
>
>So you're suggesting using a script, activated via commits to the developer 
>local repository?
>
>Once the developer committed changes to it's repository,  the script will 
>build that changes with the latest code, run all the regression
>tests, unit test, etc...If the test pass fine, then the developer can choose 
>if he wants to push his changes to the main repository?
>
>
>

I don't think that is how the Git plugin does what it does.

I believe the Git plugin monitors multiple repositories and branch names for 
changes.  If a change is detected in one or more repositories, the plugin 
merges those changes into its local branch, and attempts to run the job steps 
you specify (compile, test, deploy, whatever).  The Git plugin has an optional 
step at the end, "Git Publisher" which will push the results of that merge to 
the remote specified in the plugin.

I think that allows a workflow where the only user allowed to push to the 
authoritative repository is the Jenkins user.  Other users push to their own 
repositories which are monitored by the Jenkins job.  If their submissions are 
successful, then the results of merging their proposed change are pushed by 
Jenkins to the authoritative repository as the Jenkins user.

I've been experimenting with a variant of that workflow and it has worked OK 
for me.  My variant has been that by convention I never push to certain 
branches.  Those branches only receives commits from Jenkins, and only after 
Jenkins has run some series of checks successfully.  It has worked well enough, 
though I suspect it won't work in a larger organization, since it is a 
convention for users not to push to the integration branch, not an enforced 
rule.

I think you could do the same with Mercurial and a script, though I'm not a 
Mercurial user, so I can't be certain.

Mark Waite

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to