David Brown (2015-07-28 22:51):
Here is my scenario. I have a number of Jenkins projects which build
from the same set of Mercurial repositories, compile source code and
generate executable files, etc. I’m used to being able to run any
combination of these jobs in parallel. Each build runs for at least 3+
hours, but the first third of the build time is spent cloning the
repositories and preparing an individual workspace. I have restricted
disc space so the jobs are setup to delete their workspace at completion.
I am looking to reduce my build times.
When I discovered the “Use Repository Sharing” option I was hoping it
would enable me to shave the repository cloning time off the start of
each build. However I have not been able to find much in the way of
documentation or advice on the use of this feature, perhaps I’ve not
been looking in the right places or else I’ve not looked hard enough.
Here’s what I’ve discovered so far, partly through trial and error:
* Need to also assign a specific Directory in the “Use custom
workspace” option within Advanced Project Options (a per Project
setting)
* I set the same shared workspace folder against two jobs
* When I attempted to run both jobs in parallel one job failed with
message “The process cannot access the file because it is being
used by another process.”, suggesting that I have to wait for the
build of Project A to finish before I can start a build of Project B
Am I naive in expecting this feature to allow jobs to be run in
parallel? If I can’t do this then I don’t think this feature will be
of any benefit to me.
Any tips, guidance or advice would be gratefully received.
I think you can approach this problem differently.
1. Create a separate job (e.g. `load-repo`) which will only load
current repository to some folder (this can be just workspace).
2. In the build/test jobs simply use the folder (you can use it
directly or add symbolic link to it or copy if you must - depending
on your build process).
3. Create a separate job that just runs above jobs. In this job you run
`load-repo` as a blocking job and then run other jobs in parallel.
I don't think you can do it with just repository sharing as you would
always have a problem when one job is already running (using repository)
and other job wants to update repository.
Regards,
Nux.
--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/55B87867.6050008%40mol.com.pl.
For more options, visit https://groups.google.com/d/optout.