We have a Jenkins job which uses Multiple SCM to clone 5 repositories and then builds it using a gradle script. There are two things that are slowing us down:
Also would there be a way to tell Jenkins to normally pull the repos with a hart reset and only clone on changes of .gitignore?
This is a duplicate of my question on Stackoverflow, it seems there is not much activity on the Jenkins front there. What is the best place to ask professional Jenkins questions?
We have a Jenkins job which uses Multiple SCM to clone 5 repositories and then builds it using a gradle script. There are two things that are slowing us down:
- A build is triggered on every repository on every change. That is fine, but it currently means that every time one of the repositories changes, all repositories are cloned again. Is there a way to make sure only the changed repo is cloned?
- Since it is a multi-configuration job, the clone is executed twice, once in the parent workspace and once in the configuration workspace. Now as I understand it this is the expected behaviour, but is there a way to change this and only clone in one of those or just copy the cloned workspace?
Also would there be a way to tell Jenkins to normally pull the repos with a hart reset and only clone on changes of .gitignore?
This is a duplicate of my question on Stackoverflow, it seems there is not much activity on the Jenkins front there. What is the best place to ask professional Jenkins questions?
--
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-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/80d1217d-0b7c-42d2-88c8-40f7138f27b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thank you for the kind answer. I saw many of the git plugin options mentioned here and there, but since I am using the Multiple SCM plugin, there is no place to select these options. Would you know where to find them and if it is possible with this plugin?
About the cloning: I know that in general the git plugin actually does not use clone, but init and then fetch. In my particular case you are right: it only fetches and checks out the latest changes. However, this is relatively slow. The whole process takes 60 seconds (30 s for the master, 30 s for the workspace), where the rest of the build takes 2. This is not a huge issue now, I just want to make sure it does not become one later.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/e8ffb5ee-8e6e-4608-9be3-92065ad5c128%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On my previous project we indeed had some binaries in the repos, which made cloning a pain. However, we now have very new, very small repos, which contain nothing but the code and some configuration and documentation. So no binaries. I will look into the file system though, because Jenkins is running inside a VM.
About the git settings: too bad, I think I will try and convince the others to consolidate into one repository, because there are many issues related to the multi-repo setup we chose...
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b066d050-634e-4cea-bdc0-b40810f6155d%40googlegroups.com.