简体   繁体   English

Azure DevOps - 使用部署组或部署作业向环境发布管道?

[英]Azure DevOps - Release Pipeline using Deployment Groups or Deployment Job to an Environment?

I'm new-ish to Azure DevOps, so I've missed how it got to where it is.我是 Azure DevOps 的新手,所以我错过了它是如何到达现在的位置。 By that I mean that I've seen two different approaches for deployment to environments and I'm not sure which superseded which:我的意思是我已经看到了两种不同的环境部署方法,我不确定哪个取代了哪个:

  • Using a Release Pipeline and Defined Deployment Groups to deploy across stages (environments) See here使用发布管道和定义的部署组跨阶段(环境)进行部署, 请参见此处
  • Using a Deployment Job in a Pipeline, then using a release pipeline to orchestrate pushing it to different environments - See here在管道中使用部署作业,然后使用发布管道来协调将其推送到不同的环境 - 请参见此处

It's interesting that the first link MS docs refer to as being classic, however the latter is not.有趣的是,第一个链接 MS 文档称为经典,但后者不是。

I'm currently using Deployment Groups to define the App Servers I deploy to for each environment - then each stage in my Release pipeline targets a different deployment group (environment).我目前正在使用部署组来定义我为每个环境部署的应用服务器 - 然后我的发布管道中的每个阶段都针对不同的部署组(环境)。 This seems the most fluent and natural of the solutions.这似乎是最流畅和自然的解决方案。 However, it niggles me that the Environments I setup in the Environments section still maintain that they have never been deployed to - but the deployment groups have recorded the deployments as I expect.然而,我在环境部分设置的环境仍然保持它们从未被部署到 - 但部署组已经按照我的预期记录了部署,这让我感到很恼火。 Also, the environments allow me to set useful stuff like "business hours" to wake the environment machines.此外,环境允许我设置有用的东西,比如“营业时间”来唤醒环境机器。

I looked and tried out some of the approach in the second link I posted - however, this just didn't seem intuative to me - and I can't find much in the DevOps docs to support this approach.我查看并尝试了我发布的第二个链接中的一些方法 - 但是,这对我来说似乎并不直观 - 我在 DevOps 文档中找不到太多支持这种方法的内容。 I can see the benefits in that you can store your deployment pipeline as code in your repo, and that you have finer controller over the whole process - but I couldn't get variables from the library to be used in any of the replace variables steps or really understand where the release pipelines fit in.我可以看到好处在于您可以将部署管道作为代码存储在您的存储库中,并且您在整个过程中拥有更好的控制器 - 但我无法从库中获取变量以用于任何replace variables步骤或者真正了解发布管道的位置。

So, I guess I after an inkling of what "best practice" is in this fairly straight forward scenario.所以,我想我在这个相当直接的场景中对什么是“最佳实践”有所了解。 I wondering if it's a blend of the two, but to be honest - I'm a bit lost.我想知道这是否是两者的混合,但说实话 - 我有点迷茫。

Release pipelines and deployment groups have been around for longer than Azure DevOps has been named Azure DevOps.发布管道和部署组的存在时间比 Azure DevOps 被命名为 Azure DevOps 的时间还要长。 The YAML releases are rather recent. YAML 版本是最近的。 It isn't ever spelled out explicitly, but in my mind it comes down to how you plan on delivering your product.它从未明确说明,但在我看来,这归结为您计划如何交付产品。

If you are doing Continuous delivery (choosing when to release, maybe daily, weekly, or quarterly) then I think you must use release pipelines.如果您正在进行持续交付(选择发布时间,可能是每天、每周或每季度),那么我认为您必须使用发布管道。 You might choose this also if you have multiple environments that maybe aren't in the path to production that would want to deploy.如果您有多个环境可能不在想要部署的生产路径中,您也可以选择此选项。

If you are doing Continuous deployment (every push that passes tests goes to production without any real human intervention), then I imagine you'd choose to use the YAML stages.如果您正在进行持续部署(通过测试的每次推送都会在没有任何真正人工干预的情况下投入生产),那么我想您会选择使用 YAML 阶段。 This is kind of spelled out in your second link as the approach for deploying with "release flow", which is Microsoft's approach for delivering changes for Azure DevOps.这在您的第二个链接中详细说明为使用“发布流程”进行部署的方法,这是 Microsoft 为 Azure DevOps 交付更改的方法

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

相关问题 Azure DevOps 发布管道消除了应用服务部署槽 - Azure DevOps Release Pipeline wipes out App Service Deployment Slot Azure 用于本地按需 kube.netes 部署的 Devops 发布管道 - Azure Devops release pipeline for local on-demand kubernetes deployment Azure DevOps - 本地部署管道 - Azure DevOps - on prem deployment pipeline 使用 Azure 部署组的 Angular 8 APP 的 Azure CI/CD 管道 - Azure CI/CD pipeline for Angular 8 APP using Azure Deployment Groups Azure web 使用 vscode 部署应用程序比 devops 管道更快 - Azure web app deployment using vscode is faster than devops pipeline 使用 azure devops 部署 ADF 是否会影响环境中的现有管道/作业 - Will ADF deployment using azure devops affect existing Pipelines/Jobs in the environment Azure Devops:使用拉取请求构建手动部署到环境 - Azure Devops: Manual Deployment to Environment using Pull Request build "在 Azure DevOps 管道中为 WebApp 创建部署槽" - Create deployment slot for WebApp in Azure DevOps pipeline Azure DevOps 管道部署到 Postgres 数据库 - Azure DevOps Pipeline Deployment to Postgres DB 在 Azure DevOps 发布管道中控制作业顺序 - Control Job Order in Azure DevOps Release Pipeline
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM