如何加速使用jenkins触发的git拉动? [英] How to speed up git pulling triggered using jenkins?

查看:316
本文介绍了如何加速使用jenkins触发的git拉动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一款超过2 GB的xamarin移动应用程序。
我的领导能够使用MSBuild构建它。
我给出了使用Jenkins和MSBuild作为插件自动化构建的任务。
因为这是一个非常大的应用程序,所以git拉动已经花费了一个多小时,任务进度条显示大约95%。

 问题1)我怎样才能加速这jenkins / git拉动过程? 

我正在研究客户端的虚拟机和网络速度相当不错。 b

我在这里分享我的jenkins控制台



预先致谢

解决方案


  1. 浅克隆

    您可以为 git clone 指定 - depth =< n> 。重点是减少要获取的数据。这对于连续添加新二进制文件的存储库不起作用。

  2. 参考克隆

    首先将一个完整的克隆作为jenkins作业可以访问的目录中的参考存储库。然后为 git clone 添加 - reference< path_of_the_reference_repository> 。定期更新参考资料库,每周两次左右,具体取决于您的需求。重点是重用参考存储库中已有的任何数据,仅用于获取本地不存在的数据。


This is a xamarin mobile application of size more than 2 GB. My lead was able to build it using MSBuild. I am given the task of automating the build using Jenkins with MSBuild as plugin. Since this is a very big application, git pulling has already taken more than one hour and the task progress bar is showing around 95%.

Question 1) How can I speed up this jenkins/git pulling process?

I am working on the client's virtual machine and internet speed is fairly good

I am sharing my jenkins console here

Thanks in advance

解决方案

  1. shallow clone

    You can specify --depth=<n> for git clone. The point is to reduce the data to be fetched. This does not work well for a repository that has new binary files added continously.

  2. reference clone

    First make a full clone as the reference repository in a directory which the jenkins job can access. Then add --reference <path_of_the_reference_repository> for git clone. Update the reference repository regularly, maybe twice a week or so, depending on your needs. The point is to reuse any data that already exist in the reference repository, only to fetch the data that don't exist locally.

这篇关于如何加速使用jenkins触发的git拉动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆