使用 subversion 部署 CFML 应用程序的策略?

发布于 2025-01-03 04:36:29 字数 521 浏览 0 评论 0原文

我们的团队使用 SVN 来跟踪我们的日常开发。然而,当涉及到部署到 QA 和 Live 时,我们不确定该怎么做。

听说过 Jenkins,但不确定我们是否想要处理学习它的开销,除非它确实能帮助我们实现我们想要的目标。

如何使用 Branch 或 Tag 来:

  • 轻松恢复到上一个​​工作状态
  • 跟踪正在部署的内容、部署时间和部署内容
  • 如何将更新推送到 QA,然后推送到 Live

现在,每个开发人员只需将所有内容提交给 Head。所以Head虽然稳定,但并不能保证稳定。

使用符号链接? IIS虚拟文件夹?指向一个版本而不是覆盖实时版本?或者Live应该是SVN的导出?

有什么建议吗?谢谢!

我有点害怕 SVN 中的分支/合并,因为如果 SVN 说有问题,我们经常会陷入困境。

合并的方式有很多种,如果开发者选择了不正确的方式,那么 svn 就会被搞砸,而且在 SVN 中撤消事情似乎很容易。

我们现在不想使用 Git...

Our team uses SVN to keep track of our day-to-day development. However, when it comes to deploying to QA and Live, we are not sure what to do.

Heard of Jenkins but not sure if we want to deal with the overhead of learning that, unless it would really assist us on what we want.

How to use Branch or Tag to:

  • ease of reverting to last working state
  • keep track of what's being deployed, when and what exactly being deployed
  • how to push updates to QA, then to Live

Right now, every developer just commit everything to Head. So Head, although stable, is not guaranteed to be stable.

Use symbolic link? IIS virtual folder? to point to a version instead of overwriting for live? Or should Live be an export from SVN?

Any suggestion? Thanks!

I'm a little scared of Branch / Merging in SVN 'cause if SVN says something's wrong, we often stuck there.

There are multiple way of merging, and if the developer choose the incorrect way, then the svn will be screwed, and it does seem easy to undo things in SVN.

We don't want to use Git as of now...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

七禾 2025-01-10 04:36:29

首先,Jenkins 是一个自动构建服务器,并且由于 ColdFusion 应用程序不被编译,因此它不会比 svn 本身更有帮助。我确信 CF 应用程序有一些引人注目的功能,但正如您所说,学习曲线可能不值得付出努力。

我们拥有与您相同的开发/质量保证/产品级别,并且 svn 非常适合我们的需求。这个过程是这样的:

  1. 开发人员使用 Subclipse 或 TortoiseSVN 签出 HEAD 分支
  2. 开发人员将功能签入 HEAD。
  3. 当功能需要测试时,系统管理员会向 QA 服务器检查 HEAD
  4. 如果 HEAD 通过了 QA,则会创建一个分支以投入生产。该分支只是经过 QA 审查的 HEAD 副本。我们将分支文件夹命名为 prod_2_7_2012 或类似名称。
  5. 系统管理员使用 svn 将项目检出到生产服务器。有时是完整的导出和导出如果 svn 不可用,则会进行覆盖。
  6. 开发人员使用 subclipse/tortoise 检查 prod 分支。现在,他们的开发环境中拥有该应用程序的 2 个副本。
  7. QA 检查 prod 分支。
  8. 开发人员只能向产品分支提交紧急错误修复,该修复将由 QA 进行审查。
  9. 如果错误修复被批准,产品将通过 svn update 或导出进行更新。
  10. 该错误修复也适用于 HEAD 并提交给 HEAD。这会重复工作,但减轻了合并带来的麻烦。
  11. 当 HEAD 中的新功能准备好用于生产时,会重复该过程并存档旧的产品分支。

没有合并。

First, Jenkins is an automated build server, and since ColdFusion applications are not compiled, it will not help you any more than svn by itself. I'm sure there are some compelling features that are available for CF apps, but like you said, the learning curve might not be worth the effort.

We have the same dev/QA/Prod tiers as you do, and svn suits our needs just fine. The process goes something like this:

  1. Developers check out the HEAD branch using Subclipse or TortoiseSVN
  2. Developers check in features to HEAD.
  3. A system admin checks out HEAD to the QA server when features need testing
  4. If HEAD passes QA, then a branch is created to go to production. This branch is just a copy of HEAD that has been vetted by QA. We name the branch folder prod_2_7_2012 or something similar.
  5. A sysadmin uses svn to check out the project to the production server. Sometimes a full export & overwrite is done if svn is not available.
  6. Developers check out the prod branch using subclipse/tortoise. They now have 2 copies of the app in their dev environment.
  7. QA checks out the prod branch.
  8. Devs may ONLY commit emergency bug fixes to the prod branch, which will be vetted by QA.
  9. If the bugfix is approved, prod is updated with svn update or export.
  10. The bugfix is also applied to HEAD and committed to HEAD. This duplicates work, but alleviates the headache of merging.
  11. When new features in HEAD are ready for production, the process repeats and the old prod branch is archived.

No merging.

泪之魂 2025-01-10 04:36:29

最好的办法是研究所有推荐的分支和合并最佳实践。
这是关于策略的 MSDN 文章,但还有更多的观点:
http://msdn.microsoft.com/en-us/library/ee782536.aspx ?

最好做什么 找出最适合您的团队的方法并加以利用。一旦确定了自己想要做什么,就可以确定构建和部署策略。

最容易遵循的模式是使用 Main 进行开发,在 Main 的每个版本上进行分支。这样你的新开发和错误修复是分开的。从发布版本进行反向集成,以便在需要时发现错误。

Best thing to do is research all the recommended best practices for Branching and Merging.
This is the MSDN article regarding strategy but there are far more opinions:
http://msdn.microsoft.com/en-us/library/ee782536.aspx

Best thing to do? Figure out what best fits your team and use that. Once you have figured out what you want to do, then figure out your build and deploy strategy.

The easiest pattern to follow is use Main to do development, branch on each release from Main. That way your new development and your bug fixes are seperated. Do Reverse integration from Release to pick up your bugs when needed.

我要还你自由 2025-01-10 04:36:29

还有一件小事没有被注意到,那就是经常提交和更新。一旦开发人员在处理某个功能(假设有单元测试)或错误修复时获得通过的所有单元测试,他们就应该提交。我认为他们应该更频繁地更新。

没有什么比解决由于陈旧的存储库而导致的一堆冲突更能降低生产力了。

One more small thing that hasn't been noted is to commit and update often. As soon as a dev gets all the unit tests to pass when working on a feature (assuming that there is unit tests) or bug fix they should commit. They should update even more frequently in my opinion.

Nothing kills productivity like resolving a bunch of conflicts because of a stale repository.

朮生 2025-01-10 04:36:29

我的团队使用的方法是 /trunk 应该能够随时发送到生产环境。我们在单独的分支中进行所有开发(功能开发和错误修复),并在发布新版本时从主干创建标签。这些标签一旦创建就永远不会改变。

仅在针对功能完成测试并且整个项目的所有单元测试都通过后,分支才会合并回主干。在开发过程中,我们从 /trunk 合并到我们通常每天工作的分支,以保持我们的开发分支跟上 /trunk 的进度。

我见过几种将代码从标签获取到生产服务器的不同方法。我们目前采取的方法是使生产服务器只是一个工作副本(签出到特定标签)并将 Apache 配置为不提供 .svn 文件夹中的文件。这样,当新版本出现时,就像对新标签执行 svn switch 命令并重新初始化我的应用程序一样简单。此外,它使 SVN 中的所有内容都整齐地分开,因此,如果某些内容错过了 QA 流程,您可以轻松回滚到以前的标签。

不要害怕合并。如果你跟上它并且不让它在合并之间连续几周萎靡不振,那没什么大不了的。

My team uses the approach that /trunk should be able to be sent to production at any time. We do all development (both feature development and bug fixes) in separate branches and create tags from trunk when we release a new version. These tags never change once they are created.

Branches are merged back into trunk only after testing has been completed against the feature and all unit tests for the entire project pass. During development, we merge from /trunk to the branch we are working in usually daily to keep our development branches caught up with /trunk.

I've seen a couple of different approaches to getting code from a tag to the production server. The route we're taking at present is to make the production server simply a working copy (checked out to a specific tag) and configure Apache to not serve up the files in the .svn folders. That way when a new version comes out, it's as simple as doing an svn switch command to the new tag and reinit'ing my app. Furthermore, it keeps everything neatly separated in SVN so you can easily roll-back to previous tags if something slips past your QA process.

Don't be afraid of merging. If you keep up with it and don't let it languish for weeks on end between merges it's no big deal.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文