jth*_*son 4 git gerrit jenkins
我们有一个使用Jenkins配置的自动构建系统,与Gerrit集成.今天的瓶颈之一是,由于存储库大小,Jenkins需要大约3.5分钟才能为每个构建完成一个"git clone".使用"git archive"进行相同的退房大约需要12秒.
詹金斯的gerrit插件可以配置为使用"git archive"吗?这将大大减少我们的构建时间.
虽然似乎不可能使用未经修改的Git插件版本,但我确实分两步完成:
1) Change SCM to "None" for the particular job.
2) Add a build step at the beginning to checkout using "git archive"
Run Code Online (Sandbox Code Playgroud)
这是步骤2)的示例.
git archive --format=tar --remote=git://host/repo ${GERRIT_REFSPEC} > ${BUILD_ID}.tar && tar xvf ${BUILD_ID}.tar && rm ${BUILD_ID}.tar
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3720 次 |
| 最近记录: |