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 On Tue, Sep 24, 2019 at 5:06 AM Damien Garrido < [email protected]> wrote: > 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 > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/b230aa74-6598-454d-a052-1b573fba2954%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/b230aa74-6598-454d-a052-1b573fba2954%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Thanks! Mark Waite -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtEUSKPbgh%3DbvHx_cX1sUDch%2B2%3D_TD96bnARUcrjkUADvQ%40mail.gmail.com.
