Sri
Sri

Reputation: 479

To make Jenkins job download code from GIT faster

I am working on Building .NET Application with Jenkins using MSBuild.
As part of build process, first step we are downloading the code from GIT which is Appx. 2GB of data(sourcecode files along with dependencies/libraries).

Jenkins job is taking 30mins to complete, only to delete the previous work space and download the code from GIT.
Users wants to make it faster, and below are the configurations I have selected for this Jenkins job to download the code the GIT.

1) I tried configuring the "Additional Behaviours" to

i) 'Advance clone behaviours' with options - 'shallow clone' and 'Timeout (in minutes) for clone and fetch
operations :60'
ii) 'Wipe out repository & force clone'
iii) 'Advanced checkout behaviours' with options - 'Timeout (in minutes) for checkout operation :60' [I selected this option to resolve the Timeout after 10 minutes,Could not checkout issue]

2) Build Environment

i) Selected 'Delete workspace before build starts'

Appreciate your inputs that can make my Jenkins jobs to download the code and complete faster.

Upvotes: 2

Views: 592

Answers (1)

VonC
VonC

Reputation: 1323803

Build Environment i) Selected 'Delete workspace before build starts'

You could avoid selecting that step, resulting in a faster Git working tree initialization (since it does exist already, from the previous execution of that job)

If you need some cleanup, you can have a first build step deleting build folders, without having to delete the all workspace.

Upvotes: 1

Related Questions