I have found the git plugin keeps some sort of state about the built branches 
in the workspace.

If we configure the workspace to be deleted in the beginning or end of the 
build, there's no predicting which branch Jenkins is going to build next. (Of 
course, we could specify the branch in the job configuration but there are some 
jobs for which we really like it when Jenkins can build and test whatever 
branch someone should push.)

So I have used a workaround: Check the "Clean after checkout" box in git SCM 
Advanced settings. I think it works as well as cleaning the workspace. It might 
actually make thing slightly faster because Jenkins does not have to clone the 
workspace from scratch. If you have a good-sized git repo, even the cloning 
might take a couple of minutes.

-- Sami

William Soula <[email protected]> kirjoitti 19.2.2013 kello 15.52:

> I am trying to build a git project on a windows slave using Jenkins 
> 1.501 with git plugin 1.1.17.  I like to wipe the workspace before 
> checking out so I have that option checked.  When I run the build 
> sometimes it is able to delete the workspace but a lot of the time it 
> can't delete the workspace due to a pack file being locked.  I checked 
> out what was locking the file and it is javaw.exe.  If I restart the 
> slave then I am able to build once and then another pack file is locked 
> by the slave process.
> 
> I have tried googling for a solution and apparently there is none 
> besides not using windows, which is not news to me, git is not a windows 
> tool, never supposed to be never will be.
> 
> So my question is if there is some way to restart the slave within 
> another job.  My idea is to have something like a the log analyzer 
> plugin detect the job failed due to the pack problem and kicks off 
> another job that kills the slave and restarts it and kicks off the first 
> job again.
> 
> Will
> 
> -- 
> 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 [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 

-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to