构建和部署之间的区别? [英] Difference between build and deploy?

查看:555
本文介绍了构建和部署之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

构建和部署 重新部署
如果您只更改了 HTML 而不更改了 Java 代码,应该怎么办?
我应该进行 构建和部署 还是只是进行 重新部署

What is the difference between a build and deploy and re-deploy? What should be done when you just have some HTML changes and no Java code changes? Should I do a build and deploy or just a re-deploy?

推荐答案

免责声明:定义构建和部署的含义非常重要

Disclaimer: Defining what build and deploy means is very subjective.

我将从部署开始。部署应该意味着拿走我所有的工件,然后将它们复制到服务器上,或者在服务器上执行它们。

I will start with deploy. Deploy should mean take all of my artifacts and either copy them to a server, or execute them on a server. It should truly be a simple process.

构建工具,处理我的所有代码/工件并为部署做好准备。意思是编译,生成代码,打包等。

Build means, process all of my code/artifacts and prepare them for deployment. Meaning compile, generate code, package, etc.

那有帮助吗?有些人确实认为部署是构建过程的一部分,对此我并没有真正提出异议,因为通常为了进行测试或运行,您必须在某个地方进行部署。

That helped? Some people do consider deploy as part of the "build process" which I don't really argue with because generally in order to test or run you have to deploy it somewhere.

通常,如果规则是动态代码,则需要进行构建/重新部署。

The rule is generally if it is dynamic code, then you need to do a build/redeploy.

如果您只是编辑静态html,css,图像等,则只需修补(最好重启服务器)即可。

If you are just editing static html, css, images etc. then you can simply just patch (and preferably a server restart).

与往常一样,在修补时,存在无法部署整个代码库或有人做错了的风险。

As always when "patching" there is added risk that you could not be deploying the entire code base, or someone could do it wrong.

我个人喜欢进行完整的构建/重新部署,因为您始终知道自己与源代码控件保持同步。但是,始终存在部署变坏的风险,无论是构建部分还是安装部分。如果构建需要很长时间,或者不必要部署大量活动部件,则可以考虑将其分解为较小的可部署组件,或者创建更完整的部署计划。

Personally I like doing full build/redeploys because you always know you are in-sync with your source control. However there is always risk that deployments go bad, either the build part or the install part. If your builds take a long time, or you are unnecessarily having to deploy a lot of moving parts, then consider either breaking them down into smaller deployable components or create a more complete deployment plan.

像往常一样,这里没有银弹。

As usual there is no silver bullet here.

这篇关于构建和部署之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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