0

Within our Jenkins server we defined ~20 declerative pipeline jobs. Only one executor is defined. The pipeline jobs get their pipeline script from git. The corresponding repositories are large (~500-1000MB). When we start multiple jobs per hand, all these jobs start to clone their repositories and afterwards they are forwarded to the build queue and are build in consecutive order as expected.

The issue is that we overload our git server by these parallel running clone jobs. Is it possible to tell Jenkins to pull only one repo at time ?

Maik
  • 541
  • 4
  • 15

1 Answers1

1

I think what you mean is performing a lightweight checkout when retrieving the pipeline script. Have a look at this:

jenkins how to enable checkout lightweight for pipelineJob?

Also here is some more q/a info on the topic:

https://docs.cloudbees.com/docs/cloudbees-ci-kb/latest/client-and-managed-masters/why-is-my-multibranch-project-cloning-the-whole-repository-on-the-master

In short, you should perform lightweight checkouts on the master to get your pipeline scripts.

Franco
  • 193
  • 1
  • 9
  • Thanks this is exactly what I was searching for. It seems our git server (gitea) should support this feature anyway we get the message: "Lightweight checkout support not available, falling back to full checkout." – Maik Apr 03 '23 at 17:05
  • Previous stated issues occurs when branch contains slashes. Therefore add 'refs/heads' prefix. See also: https://issues.jenkins.io/browse/JENKINS-47978 – Maik Apr 04 '23 at 16:06