应该使用Git来存储连续的集成构建吗? [英] Should Git be used to store continuous integration builds?

查看:63
本文介绍了应该使用Git来存储连续的集成构建吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在每天可以创建多个构建(发布候选软件包)但每月仅升级一个的环境中,我认为将每个构建都存储在Git中会很浪费,但是应该在短期内保留最后几个构建的位置版本已发布.

In an environment where multiple builds (release candidate packages) can be created daily but only one a month gets promoted to production, I think storing every build in Git would be wasteful but there should be a short term location that the last few builds are published.

我当前正在将这些发布到共享目录.我过去曾见过IVY用于这种二进制发布.由于它永远不会删除任何东西,因此Git似乎会过分膨胀.

I'm currently publishing these to a shared directory. I have see IVY used for this sort of binary publishing in the past. Git seems like overkill as it would bloat due to it's model of never delete anything.

是否存在一种约定的管理/发布这些临时构建工件的标准化方法?

Is there an agreed, standardized way of managing/publishing these transient build artifacts?

推荐答案

我不会将构建工件存储在git中,而是考虑共享来自持续集成(CI)服务器或专用工件存储库(例如)的构建工件人工工厂关系.总的来说,我发现最好避免在所有SCM中使用大型二进制文件,因为它们无法进行差异化或进行增量更新,因此您会发现git repo迅速增长,因为它在每次更改时都存储完整版本的二进制文件.

I would not store the build artifacts in git but instead look at sharing the build artifacts from either a Continuous Integration (CI) server or a dedicated artifact repository such as artifactory or nexus. In general I find it best to avoid large binaries in all SCM's as you cant diff them or make incremental updates so you will find your git repo grows rapidly as it stores a complete version of the binary on every change.

大多数持续集成工具(例如Jenkins)将能够归档最近的X个构建工件或上个月内完成的所有构建工件.他们还提供了一些插件,这些插件可以帮助支持和自动化您认为有帮助的构建过程的升级(即

Most continuous integration tools (such as Jenkins) will have the ability to archive the last X build artifacts or all build artifacts made within the last month. They also have plugins which help support and automate the process of promoting builds which you mat find helpful (i.e. Jenkins build promotion).

通过使用构件存储库或CI服务器来管理构建构件,您通常还可以通过API访问构件,当您要自动化部署过程时,API很有用,例如,您可以进行诸如"getLastSuccesfullBuild"之类的调用,并且'getLastPromotedBuild()'等.

By using an artifact repository or the CI server to manage the build artifacts you can also usually access the artifacts via an API which comes in very useful when you want to automate deployment processes for example you can make calls like 'getLastSuccesfullBuild' and 'getLastPromotedBuild()' etc.

这篇关于应该使用Git来存储连续的集成构建吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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