简体   繁体   English

Azure DevOps - 将一个构建工件部署到多个站点 Web

[英]Azure DevOps - Deploy One Build Artifact To Multiple Web Sites

We currently have one build artifact that needs to be deployed to a deployment group of multiple ASP servers with multiple IIS client sites.我们目前有一个构建工件需要部署到具有多个 IIS 客户端站点的多个 ASP 服务器的部署组。 There are up to 20 servers with 30 client sites on each server.最多有 20 台服务器,每台服务器上有 30 个客户端站点。 One advantage is each site has the same physical path except for the client name:一个优点是每个站点都具有相同的物理路径,但客户端名称除外:

  • C:\Web\Sites\Client1 C:\Web\Sites\Client1
  • C:\Web\Sites\Client2 C:\Web\Sites\Client2

Has anyone deployed one build artifact to multiple sites?有没有人将一个构建工件部署到多个站点? I also want the flexibility of deploying to individual sites for support/upgrade purposes.我还希望能够灵活地部署到各个站点以实现支持/升级目的。 I was thinking about the following options:我在考虑以下选项:

  • A release pipeline for each client site (30 release pipelines)每个客户端站点的发布管道(30 个发布管道)
  • One release pipeline with a production stage for each client site (30 stages)一个发布管道,每个客户站点都有一个生产阶段(30 个阶段)
  • Some way to dynamically trigger one production stage for each client site为每个客户站点动态触发一个生产阶段的某种方法

Any ideas or examples would be greatly appreciated.任何想法或例子将不胜感激。

I have a similar situation, where I deploy one build to many environments.我有类似的情况,我将一个构建部署到多个环境。 As @jessehouwing is suggesting you can use Deployment Groups but this is not working for me since I don't have VMs but Azure Webapp Services.正如@jessehouwing 建议您可以使用部署组,但这对我不起作用,因为我没有虚拟机,但没有 Azure Webapp 服务。

What works for me:什么对我有用:

  • 1 release pipeline per client - you can easily perform deployments in batches (or trigger automatic release), and when you want to deploy only to one client, it's not a problem.每个客户端 1 个发布管道- 您可以轻松地执行批量部署(或触发自动发布),并且当您只想部署到一个客户端时,这不是问题。 For me, it's better than 1 release pipeline with many stages - one per client, because very quickly you will have a lot of update releases, which are mixing with deployments to all clients and it will create a mess.对我来说,它比 1 个具有多个阶段的发布管道更好——每个客户端一个,因为很快你就会有很多更新版本,它们与所有客户端的部署混合在一起,这会造成混乱。
  • triggers - you can tag your build and then use this tag to automatically create releases to all of the release pipelines.触发器- 您可以标记您的构建,然后使用此标记自动创建所有发布管道的发布。 On a release pipeline stage level your can decide about automatic release creation/execution based on build branch and tag.在发布管道阶段级别,您可以根据构建分支和标签决定自动发布创建/执行。 See my post on how to add tag to your build and use it in release pipeline in Azure DevOps . 在 Azure DevOps 中查看我关于如何将标签添加到您的构建并在发布管道中使用它的帖子

To ease the process around release pipeline creation (for new environments/clients) you can use:为了简化发布管道创建过程(对于新环境/客户端),您可以使用:

  • cloning - you can just clone existing pipeline and just change the config克隆- 您可以只克隆现有管道并更改配置
  • export/import - you use this process to export pipeline definition, then modify it in some script and then import as a new pipeline导出/导入- 您使用此过程导出管道定义,然后在某些脚本中修改它,然后作为新管道导入
  • tasks groups - something I find very useful.任务组——我发现它非常有用。 You can group whole bunch of tasks you have within a stage into task group .您可以将一个阶段中的所有任务分组到任务组中。 Basically you can create your own tasks based on existing tasks.基本上,您可以根据现有任务创建自己的任务。 Then, you can add such task group to other pipelines and instead of configuring 10 tasks you can add 1 task group.然后,您可以将此类任务组添加到其他管道,而不是配置 10 个任务,您可以添加 1 个任务组。
  • variable groups / library - instead of putting variables into the pipeline you can create variable group and then just connect such group to particular stage or to whole release.变量组/库- 您可以创建变量组,然后将此类组连接到特定阶段或整个版本,而不是将变量放入管道中。 I find this very helpful, especially when I have multiple release pipelines for one client and they share a lot of configuration.我发现这非常有用,尤其是当我为一个客户端提供多个发布管道并且它们共享大量配置时。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 azure devops 在一个 azure web 应用程序中构建和部署两个项目 - build and deploy two project in one azure web app using azure devops 在 Azure Devops 中一键部署多个工件 - One click deploy of multiple artifacts in Azure Devops Azure Devops 多个工件基于不同的配置或一个工件 - Azure Devops multiple artifacts based on different configs or one artifact Azure DevOps 将工件打包的应用程序部署到 IIS - Azure DevOps deploy artifact packaged application to IIS Azure DevOps 工件 - 如何将构建工件发布到 azure 工件提要 - Azure DevOps Artifacts - How to publish the build artifact to azure artifact feed Azure DevOps - 构建和部署简单的 PHP Web 应用程序 - Azure DevOps - Build and Deploy simple PHP Web App 无法从Azure DevOps“ IIS Web App Deploy”任务中下载工件 - Unable to download artifact from Azure DevOps “IIS Web App Deploy” Task Azure Devops Pipeline将一个存储库部署到多个Azure服务 - Azure Devops Pipeline to deploy one repository to multiple Azure services Azure DevOps 构建工件存储在哪里 - where is Azure DevOps build artifact stored Azure DevOps 构建多个 dotnet 功能并将其部署到同一个功能应用程序 - Azure DevOps build and deploy multiple dotnet functions to same functionapp
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM