如何使用 TFS 从给定特定内部版本号的放置位置进行部署

发布于 2024-11-08 14:55:07 字数 283 浏览 0 评论 0原文

尝试使用TFS实现CI。我的构建工作正常,并且项目都很好地分割在放置文件夹中。我的问题是,如何允许 QA 团队排队部署“构建”(没有实际构建正在进行),他们可以在其中给出特定的构建号。然后,使用此构建号来部署该特定构建放置文件夹中的位。

最终目标是在队列构建对话框中为他们提供几个参数(已经完成),然后开始部署过程。我考虑使用 TFS Deployer,尝试创建自己的部署过程模板,然后从 .proj 文件执行 powershell 脚本。似乎每个选项都有其自身的复杂性。

谁能给我一些关于实现这一目标的最佳方法的指导?

Trying to implement CI using TFS. I have the builds working fine and the projects are all nicely split up in the drop folder. My question is, how can I allow the QA team queue up a deployment "build" (no actual building going on) where they can give a specific build number. This build number is then used to deploy the bits in that specific build drop folder.

The ultimate goal is to give them a couple of parameters on the queue build dialog (done that already) and then start the deployment process. I thought of using TFS Deployer, tried creating my own deployment process template and then executing a powershell script from the .proj file. Seems like each option has it's own set of complications.

Can anyone give me some guidance on the best way to accomplish this?

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

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

发布评论

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

评论(3

一曲爱恨情仇 2024-11-15 14:55:07

执行此操作的方法是在构建质量发生变化时触发部署。例如,当质量更改为“准备进行 QA”时,更改事件会触发从现有构建文件夹部署到 QA 系统。

请参阅在 TFS 2010 构建质量更改后发布到 FTP在 TFS 2010 的构建质量更改事件上使用 Microsoft Web 部署进行自动部署

The way to do this is to trigger the deployment on a change in build quality. The idea is that when the quality is changed to "Ready for QA" for instance, a change event triggers to deploy from the existing build folders to the QA system.

See Publish to FTP after TFS 2010 build quality change and Auto-Deployment Using Microsoft Web Deploy on Build Quality Change Event of TFS 2010.

棒棒糖 2024-11-15 14:55:07

您可以限制有权启动构建的用户,并通过此方式向您的 QA 团队授予启动手动构建的权限。

在 TFS 构建脚本中,您可以创建 QA 团队所需的部署步骤。默认情况下,您将根据参数将其设置为有条件,并将其设置为不部署。您可以根据它是 CI 构建还是手动构建来确定此值为真或假。

当您准备好让 QA 测试您的代码时,您可以为他们提供要使用的标签,他们只需将其传入即可构建和部署它。

这样做的好处是您可以控制准备将哪个签名版本的代码交给您的 QA 团队。

您还有一份报告,其中列出了移交给 QA 的特定代码和工作项目。

You can limit the users who have permissions to kick off a build and through this give the rights to kick off a manual build to your QA team.

In your TFS build script you can create the deployment steps needed for your QA team. By default you would make it conditional based on a parameter and have it set to not deploy. You could make this true or false depending on if it is a CI build or a manual build.

When you are ready to have your code tested by QA you give them the label to use and they would just have to pass it in and would be able to build and deploy it.

The beauty of this is you control which signed off version of code you are ready to hand off to your QA team.

You also have a report that lists the specific code and work items that were handed off to QA.

鹊巢 2024-11-15 14:55:07

我最近使用以下方法完成了此操作:

  1. 选择部署目标(选择计算机、站点、多个配置项数据)。
  2. 自定义 .config 文件转换以匹配部署目标(连接字符串等)。
  3. MSDeploy 的 Exec 任务使用 Web Deploy 2.0 将构建版本发送到服务器。
  4. PSExec 在服务器上远程执行 appcmd 命令以重新启动特定站点
  5. 对服务重复此操作,使用 MSDeploy 进行推送。
  6. 构建脚本生成服务的安装/卸载脚本。
  7. PSExec 用于服务(停止、卸载、安装、启动)。

这在 MSBuild 文件中保持隔离,可以从传递构建下降号的任何命令行执行该文件,也可以使用 MSBuild 任务将其添加到 TFS 构建定义中,并关闭已设置的额外参数。

I did this recently using the following:

  1. Select the deployment target (selects machine, site, multiple configuration item data).
  2. Custom .config file transformations to match deployment target (connection strings etc.).
  3. Exec task for MSDeploy to get the build to the server using Web Deploy 2.0.
  4. PSExec executing an appcmd command remotely on the server to restart the specific site
  5. Repeat for services, push with MSDeploy.
  6. Build script generates install/uninstall scripts for services.
  7. PSExec for services (stop, uninstall, install, start).

This was kept isolated in an MSBuild file, which can be executed from any command line passing in the build drop number, or can be added to the TFS build definition with an MSBuild task, keyed off of the extra parameters you've already set up.

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