Heavy checkouts for pull requests take a lot of disk space on our master server

9 views
Skip to first unread message

Damien Garrido

unread,
Sep 24, 2019, 7:06:39 AM9/24/19
to Jenkins Users
Hello,

While using the Bitbucket Branch Source plugin version 2.4.0 along with the Stash Pullrequest Builder plugin version 1.7.0, when a change request is processed by Jenkins, a preliminary checkout is done on the master server in order to retrieve the Jenkinsfile, i.e. the "Checking out git <Bitbucket repository URL> into <Jenkins master server local Pull Request folder>/workspace@script to read Jenkinsfile" message.

Once the Jenkinsfile has been retrieved, and even if it is the only file needed (?), no clean up of the checkout is done on the master server.
A second checkout is done afterward on our ephemeral agents to do the merge actions and the build.

The point is that, since the workspaces with the checkouts stay on the Jenkins master server, we rapidly run out of disk space on the master server because of some heavy Git repositories with a lot of Pull Requests.

Is there an option or a way to clean the workspace checkouts on the master server after the Jenkinsfile has been retrieved ?

Thank you for your help !

Damien

Mark Waite

unread,
Sep 24, 2019, 7:10:28 AM9/24/19
to Jenkins Users
If the Bitbucket branch source allows it, you can create a reference repository on the master and add the extension to enable use of the reference repository during checkout.

Refer to https://youtu.be/jBGFjFc6Jf8?t=6434 for hints on handling large git repos (Jenkins World 2017 lightning talk on "Git in the Large").  I updated the slides in a Jenkins World 2019 post at https://www.slideshare.net/markewaite/git-for-jenkins-faster-and-better

--
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/b230aa74-6598-454d-a052-1b573fba2954%40googlegroups.com.


--
Thanks!
Mark Waite
Reply all
Reply to author
Forward
0 new messages